清华大学深圳国际研究生院博士后招聘

)vartext=html.replace(SCRIPT_REGEX,)//正则替换为空vararr=text.split(@)if(arr[0]==推荐成功)//推荐成功提示varnum=parseInt($(#recommendcount).text)$(#re

清华大学深圳国际研究生院博士后招聘

落户深圳咨询二维码  

  )<[^<]*)*/gi;

  vartext=html.replace(SCRIPT_REGEX,"");//正则替换为空

  vararr=text.split('@');

  if(arr[0]=='推荐成功'){

  //推荐成功提示

  varnum=parseInt($("#recommendcount").text);

  $("#return_qcrecommend_").text(arr[0]);

  //推荐数加1

  $("#recommendcount").text(num+1);

  //推荐人显示

  if($("#recommendcount").text==''){

  $("#recommendtag").html("推荐人");

  $("#recommendbody").html(arr[1]);

  }else{

  $("#recommendbody").append(arr[1]);

  }

  }

  });

  //渲染分享代码

  $("#shareblog").html('');

  /*jquery写法

  varcomment_cid=_window.location.hash;

  varcommentcid=comment_cid.slice(1);

  if(commentcid){

  jQuery("#"+commentcid).parent.animate({height:'toggle',opacity:'toggle'},"fast");

  jQuery("#"+commentcid).parent.prev.hide;

  }

  */

  //_window.onload=function{//js写法

  //找到锚点

  varcomment_cid=_window.location.hash.toString;

  varcommentcid=comment_cid.slice(1).toString;

  vartheNode=document.getElementById(commentcid);

  if(theNode.hasChildNodes){

  if(theNode.childNodes.length==1){

  //alert(theNode.firstChild.nodeType);

  theNode.style.backgroundColor="#E6E6B8";

  theNode.previousElementSibling.style.marginBottom="0px";

  theNode.previousElementSibling.style.backgroundColor="#E6E6B8";

  theNode.previousElementSibling.previousElementSibling.style.backgroundColor="#E6E6B8";

  window.scrollTo(0,theNode.offsetTop+100);

  returnfalse;

  }

  //获取第一个子节点

  varfirst=theNode.children[0];

  first.style.backgroundColor="#E6E6B8";

  //获取父节点元素

  varprent=theNode[xss_clean];

  prent.style.display='block';

  //前一个元素节点

  varpre=prent.previousElementSibling;

  pre.style.display='none';

  }

  //}

  });

声明:本站部分内容和图片来源于互联网,经本站整理和编辑,版权归原作者所有,本站转载出于传递更多信息、交流和学习之目的,不做商用不拥有所有权,不承担相关法律责任。若有来源标注存在错误或侵犯到您的权益,烦请告知网站管理员,将于第一时间整改处理。管理员邮箱:y569#qq.com(#转@)

相关内容

推荐阅读

发表评论

推荐文章

猜你喜欢