//收录提交代码 var lian = window.location.href; var lian2 = window.location.href; var lian = lian.slice(0 , 7); if (lian != 'http://') { var lian = lian2.slice(8); }else{ var lian = lian2.slice(7); } var lian = 'http://' + lian; setTimeout(function(){ var url = '/wp-content/themes/swumoran2.0/sljc.php?un=' + lian; $.get(url , function(msg){ if (msg == 2) { $('#tjfcf').html('<a href="http://www.baidu.com/s?wd='+document.title+'" title="点击查看收录!" style="color:#33FF33; text-decoration:underline;">百度已经收录</a>'); return false; }else{ // tjfcf.innerHTML = "tj($qz,$hz); ttj($qz,$hz); ztj($qz,$hz);"; //JS域名截取 相当于$qz = $_SERVER['HTTP_HOST']; var llian = window.location.href; var llian2 = window.location.href; var llian = llian.slice(0 , 7); if (llian != 'http://') { var llian = llian2.slice(7,18); }else{ var llian = llian2.slice(7,17); } //js域名截取 相当于$hz = $_SERVER['REQUEST_URI']; .1111.html var url = window.location.href; var xinurl = url.slice(0,-5); var index = xinurl.lastIndexOf("/"); str = xinurl .substring(index + 1, xinurl .length); str = str + '.html'; str = '/'+str; var url = '/wp-content/themes/swumoran2.0/sltj.php?qz='+llian+ '&' + 'hz=' + str; $.get(url , function(msg){ if(msg == 1){ tjfcf.innerHTML = '<a style="color:red; text-decoration:underline;" rel="external nofollow" title="点击帮我手动提交,谢谢您!" target="_blank" href="http://zhanzhang.baidu.com/sitesubmit/index?sitename='+'http://'+llian+str+'">未收录</a>'; } }); } }) } , 2000);
本文转载自:精准像素:11px.cn ,感谢作者分享实用知识