)<[^<]*)*/gi; var text = html.replace(SCRIPT_REGEX, ""); //正则替换为空 var arr = text.split('@'); if(arr[0] == '推荐成功') { //推荐成功提示 var num = parseInt($("#recommendcount").text()); $("#return_qcrecommend_828353").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写法 var comment_cid = window.location.hash; var commentcid = comment_cid.slice(1); if(commentcid) { jQuery("#"+commentcid).parent().animate({height: 'toggle', opacity: 'toggle'}, "fast"); jQuery("#"+commentcid).parent().prev().hide(); } */ //window.onload = function(){ //js写法 //找到锚点 var comment_cid = window.location.hash.toString(); var commentcid = comment_cid.slice(1).toString(); var theNode = document.getElementById(commentcid); if(theNode.hasChildNodes()) { if(theNode.childNodes.length==1) { //alert(theNode.firstChild.nodeType); theNode.style.backgroundColor =