(请教PTC制冷片DIY除湿机)
)<[^<]*)*/gi;
849彩票 vartext=html.replace(SCRIPT_REGEX,"");//正则替换为空
vararr=text.split('@');
849彩票 if(arr[0]=='推荐成功'){
//推荐成功提示
varnum=parseInt($("#recommendcount").text());
$("#return_qcrecommend_").text(arr[0]);
//推荐数加1
$("#recommendcount").text(num+1);
//推荐人显示
if($("#recommendcount").text()==''){
849彩票 $("#recommendtag").html("推荐人");
849彩票 $("#recommendbody").html(arr[1]);
}else{
$("#recommendbody").append(arr[1]);
}
}
});
//渲染分享代码
$("#shareblog").html('');
/*jquery写法
varcomment_cid=_window.location.hash;
849彩票 varcommentcid=comment_cid.slice(1);
if(commentcid){
849彩票 jQuery("#"+commentcid).parent().animate({height:'toggle',opacity:'toggle'},"fast");
849彩票 jQuery("#"+commentcid).parent().prev().hide();
}
*/
//_window.onload=function(){//js写法
//找到锚点
varcomment_cid=_window.location.hash.toString();
varcommentcid=comment_cid.slice(1).toString();
849彩票 vartheNode=document.getElementById(commentcid);
if(theNode.hasChildNodes()){
if(theNode.childNodes.length==1){
849彩票 //alert(theNode.firstChild.nodeType);
theNode.style.backgroundColor="#E6E6B8";
849彩票 theNode.previousElementSibling.style.marginBottom="0px";
theNode.previousElementSibling.style.backgroundColor="#E6E6B8";
theNode.previousElementSibling.previousElementSibling.style.backgroundColor="#E6E6B8";
849彩票 window.scrollTo(0,theNode.offsetTop+100);
849彩票 returnfalse;
}
//获取第一个子节点
varfirst=theNode.children[0];
849彩票 first.style.backgroundColor="#E6E6B8";
849彩票 //获取父节点元素
varprent=theNode[xss_clean];
prent.style.display='block';
849彩票 //前一个元素节点
varpre=prent.previousElementSibling;
pre.style.display='none';
}
//}
});