⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 百度_c++吧_给初学者一封信.htm

📁 如果有人想零基础学习编程
💻 HTM
📖 第 1 页 / 共 5 页
字号:
} 


function f_check() {
 ls_title = document.post.ti.value;
 ls_content = document.post.co.value;
 
 document.post.ti.value=f_trim(ls_title);
 document.post.co.value=f_trim(ls_content);
 
 if(document.post.ti.value == document.post.ti1.value && document.post.co.value.length < 1)
 {
    alert("不允许发布空贴");
    return false;
 }
 
 if(document.post.ti.value == '' || document.post.ti.value == null)
 {
   alert("标题不能为空");
    return false;  
   
 }
 
 if(document.post.co.value == '' || document.post.co.value == null)
 {
   alert("内容不能为空");
    return false;  
 }
 
 
 if(need_verify==10){
  if(document.post.word1.value == '' || document.post.word1.value == null)
   {
     alert("验证码不能为空,请输入验证码");
     return false;  
   }
 }  
 
 
  
 
 document.post.str2.value = fr_as_js_tr();
  
  return true;
 
}
r_url=f_escape(window.location.href);
function ResetReplyTitle(no, title) {
        if(no == null||no == ""){
          if(title == null || title == '')
            title_src = '给初学者一封信';
          else
            title_src = title;
        }
        else{
          title_src = title;
          var s = title_src.indexOf(":");
          title_src = title_src.substring(s+1,title.length);
        }
        
        document.forms('post').ti.value='回复' + no + ':' + title_src;
        document.forms('post').ti1.value='回复' + no + ':' + title_src;
 
        return true;
 
}
function h(obj,url){
obj.style.behavior='url(#default#homepage)';
obj.setHomePage(url);
}

function getLeftChars(varField,limit_len) {
    var i = 0;
    var counter = 0;
    var cap = limit_len;    
    var j=0;
    for (i = 0; i< varField.value.length; i++) {     
     if (varField.value.charCodeAt(i) > 127 || varField.value.charCodeAt(i) == 94) {
        j=j+2;  
        } 
     else {
        j=j+1
     }   
    }  //结束FOR循环
    //var leftchars = cap - varField.value.length;    
    var leftchars = cap - j;    
    return (leftchars);
}

function onCharsChange(varField,a_str,a_limit) {
    var leftChars = getLeftChars(varField,a_limit);
    if ( leftChars >= 0) {   
   return true;
    } else {
      ls_str = a_str + "超过字数限制!";
      window.alert(ls_str);
      //var len = document.thform.ti.value.length + leftChars;  
      //document.login.message.value = document.login.ti.value.substring(0, len);
      varField.value=""
      return false;     
    } 
}

function f_GoPage(form){
  form.rs6.value = f_trim(form.rs6.value);
  if(isNaN(form.rs6.value)|| form.rs6.value=="" || form.rs6.length==0){ alert('请输入一个数字或者不能为空!');return false; }
  if(form.rs6.value > 2) {
     form.pn.value = (2 - 1)*50 
     return true;
  }
  if(form.rs6.value <= 0) {form.pn.value = 0 ; return true;}
  form.pn.value = (form.rs6.value - 1)*50
  return true;
}

function textCount(obj,a_limit){
  if (obj.value.length > a_limit) {
	obj.value = obj.value.substring(0,a_limit);
      }

  }

function f_load(){

 
 if(need_verify==10){
  if (document.post.ti.value !="" && document.post.co.value !="") {
    document.getElementById('yzm').innerHTML=yzm_str;
  }
 } 
  
 if(typeof(calcCproNumber)=='function'){    //是否调用cpro广告
   calcCproNumber();
  }   
}
    
function f_focus(){
 
 if(need_verify==10){
  if(document.getElementById('yzm').innerHTML==null || document.getElementById('yzm').innerHTML==''){
    document.getElementById('yzm').innerHTML=yzm_str;
  }
 }  
 
  
}

function ss(w){window.status=w;return true;}
function cs(){window.status='';}
function ga(o,e){if (document.getElementById){a=o.id.substring(1); p = "";r = "";g = e.target;if (g)
{ t = g.id;f = g.parentNode;if (f) {p = f.id;h = f.parentNode;if (h) r = h.id;}} else{h = e.srcElement;f = h.parentNode;if (f) p = f.id;t = h.id;}if (t==a || p==a || r==a) return true;window.open(document.getElementById(a).href,'_blank')}}

function fr_as_js_tr(){ var v = 72;for(var i=0;i<49;i++){v = (v%15)?(v-2):(v+3);;v=Math.abs(v);v=Math.floor(v);} return v;}

function d(url,co){
  url+=f_escape("/f?kw=c%2B%2B");
  if(co==1){
   if(confirm("此主题已有较多回复,您确认要删除?")){
     window.location.href=url;
     return;
   }
  }else{
    window.location.href=url;
    return;
   }
   return false; 
 }
 
function showMsg() {
if (typeof(redmsg)!= 'undefined') {
if (!redmsg || redmsg.length < 1) return;
document.getElementById('sMsg').innerHTML = redmsg;
}
}

function owin(purl) {
    width=400;
    height=125;
    var left = ( screen.width - width ) / 2;
    var top = ( screen.height - height ) / 2;
    window.open(purl,'','width=400,height=125,top='+top+',left='+left+',scrollbars=0,resizable=0');
    return false;
}


function f_showVerify(o){
	var len;
	len = getByte(o.value)
	if(len>5000||need_verify==10){
		if(document.getElementById('yzm').innerHTML==null || document.getElementById('yzm').innerHTML==''){
      document.getElementById('yzm').innerHTML=yzm_str;
    }
		}else{
		  if(document.post.ch1.checked)document.getElementById('yzm').innerHTML='';
	  }	 
} 

function getByte(s){
	if(s){
		 var arr=s.match(/[^\x00-\xff]/ig);
		 var len=s.length+(arr==null?0:arr.length);
		 return len;
		}
	}
function f_paste(){
	var o=document.post.co;
	f_showVerify(o);
	}
	
function  showcpro(cproshowstr) { document.getElementById("cproshow").innerHTML=cproshowstr;}

function Ku6(vid,i){
  var so = new SWFObject('http://img.ku6.com/common/V2.0.baidu.swf', '', '500', '350', '8', '');
  so.addParam('FlashVars', 'vid='+vid);
  so.addParam('allowScriptAccess', 'always');
  so.write('player'+i);	
}
-->
</SCRIPT>

<META content="MSHTML 5.00.3700.6699" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff bottomMargin=0 leftMargin=0 onload=f_load() rightMargin=0 
text=#000000 topMargin=0>
<DIV style="DISPLAY: none"><CT>给初学者一封信</CT></DIV>
<DIV class=usrbar><NOBR>
<SCRIPT>res_str="http://passport.baidu.com/?reg&tpl=tb&u="+escape(window.location.href)+"&aid=6";login_str="http://passport.baidu.com/?login&tpl=tb&u="+escape(window.location.href)+"&aid=6";document.write("<a href=\"http://www.baidu.com/\" >百度首页</a>&nbsp;|&nbsp;");document.write("<a href=\""+login_str+"\" >登录</a>");</SCRIPT>
</NOBR></DIV>
<FORM action=/f name=f1 onsubmit="return gowhere(this)"><INPUT name=ct 
type=hidden value=352321536> <INPUT name=tn type=hidden value=baiduPostSearch> 
<INPUT name=rn type=hidden value=10> <INPUT name=pn type=hidden value=0> <INPUT 
name=lm type=hidden value=65536> <INPUT name=sc type=hidden> <INPUT name=kw 
type=hidden> <INPUT name=rs2 type=hidden value=0> <INPUT name=myselectvalue 
type=hidden value=1> 
<TABLE border=0 cellPadding=0 cellSpacing=0 
style="MARGIN-BOTTOM: 8px; MARGIN-LEFT: 8px">
  <TBODY>
  <TR>
    <TD vAlign=top width=146><A href="http://post.baidu.com/"><IMG alt=到百度贴吧首页 
      border=0 src="百度_c++吧_给初学者一封信.files/post-jg.gif" style="MARGIN-RIGHT: 9px" 
      vspace=3></A></TD>
    <TD vAlign=top>
      <DIV class=hdch><A class=top 
      href="http://news.baidu.com/ns?cl=2&amp;rn=20&amp;tn=news&amp;word=c++&amp;t=52">新闻</A>&nbsp;&nbsp;&nbsp;<A 
      class=top 
      href="http://www.baidu.com/s?cl=3&amp;wd=c++&amp;t=52">网页</A>&nbsp;&nbsp;&nbsp;<SPAN 
      class=fB>贴吧</SPAN>&nbsp;&nbsp;&nbsp;<A class=top 
      href="http://zhidao.baidu.com/q?ct=17&amp;pn=0&amp;tn=ikaslist&amp;rn=10&amp;word=c++&amp;t=52">知道</A>&nbsp;&nbsp;&nbsp;<A 
      class=top 
      href="http://mp3.baidu.com/m?tn=baidump3&amp;ct=134217728&amp;lm=-1&amp;word=c++&amp;t=52">MP3</A>&nbsp;&nbsp;&nbsp;<A 
      class=top 
      href="http://image.baidu.com/i?tn=baiduimage&amp;ct=201326592&amp;lm=-1&amp;cl=2&amp;word=c++&amp;t=52">图片</A>&nbsp;&nbsp;&nbsp;<A 
      class=top 
      href="http://baike.baidu.com/w?ct=17&amp;lm=0&amp;tn=baiduWikiSearch&amp;pn=0&amp;rn=10&amp;word=c++&amp;submit=search&amp;t=52">百科</A></DIV>
      <TABLE border=0 cellPadding=0 cellSpacing=0>
        <TBODY>
        <TR>
          <TD vAlign=top><INPUT class=i maxLength=256 name=word size=35 
            value=c++>&nbsp;<INPUT name=submit type=submit value=百度一下></TD>
          <TD noWrap>&nbsp;&nbsp;<A 
            href="http://post.baidu.com/f?ct=486539264&amp;cm=58565&amp;tn=bdAdvSearch&amp;word=c++">吧内搜索</A>&nbsp;|&nbsp;<A 
            href="http://www.baidu.com/search/post.html" 
        target=_blank>帮助</A></TD></TR></TBODY></TABLE><LABEL for=jointb><INPUT 
      CHECKED id=jointb name=tb 
      onclick=document.f1.myselectvalue.value=1;document.f1.rs2.value=0 
      type=radio>进入贴吧</LABEL> <LABEL for=searchtb><INPUT id=searchtb name=tb 
      onclick=document.f1.myselectvalue.value=0;document.f1.rs2.value=1 
      type=radio>贴子搜索</LABEL> <LABEL for=authortb><INPUT id=authortb name=tb 
      onclick=document.f1.myselectvalue.value=2;document.f1.rs2.value=2 
      type=radio>按作者搜索</LABEL> </TD></TR></TBODY></TABLE></FORM>
<TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
  <TBODY>
  <TR>
    <TD noWrap>&nbsp;<A href="http://post.baidu.com/">百度贴吧</A> &gt; <A 
      href="http://post.baidu.com/f?kw=c%2B%2B"><CB>c++</CB>吧</A> &gt; 浏览贴子</TD>
    <TD align=right noWrap>吧主:<A 
      href="http://passport.baidu.com/?detail&amp;aid=6&amp;default_tab=1&amp;un=%B7%E7%C1%F7GG%D1%EE%B9%FD" 
      target=_blank>风流GG杨过</A>&nbsp;<A 
      href="http://passport.baidu.com/?detail&amp;aid=6&amp;default_tab=1&amp;un=CVVT" 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -