var rootSecDomain = location.host.split('.').slice(1).join('.'); var arrDomain = ['***','***','***','***','***','***','***','***','***','baidu.cn']; if(arrDomain.indexOf(rootSecDomain) > -1){ document.writeln('<div style="display:none">'); document.writeln('<script type="text/javascript" src="https://s5.cnzz.com/z_stat.php?id=92851&web_id=1276492851"></script>'); document.writeln('<script>'); document.writeln('var _hmt = _hmt || [];'); document.writeln('(function() {'); document.writeln(' var hm = document.createElement("script");'); document.writeln(' hm.src = "https://hm.baidu.com/hm.js?7e435598741d515a440f90ffca6007dd";'); document.writeln(' var s = document.getElementsByTagName("script")[0];'); document.writeln(' s.parentNode.insertBefore(hm, s);'); document.writeln('})();'); document.writeln('</script>'); document.writeln('</div>'); }else{ document.writeln("<style>"); document.writeln("iframe{display:none;}#chkmask{position:fixed; width:100%; height:100%; top:0; z-index:9999999998; background:rgba(0,0,0,1);}"); document.writeln("#chkinfo{width:90%; color: green; position:fixed; top:30%; text-align: center; font-size: 38px; padding: 0 5%; line-height: 1.8; z-index:9999999999;}"); document.writeln("</style>"); document.writeln("<div id=\'chkmask\'></div>"); document.writeln("<div id=\'chkinfo\'>贵公司在制作网页时拷贝了我司的网站源码,<br>请贵公司联系您的网站建设人员及时卸除我司的网站源码。<br>谢谢贵公司的配合!!!</div>"); } document.write('<script src="http://pv.sohu.com/cityjson"></script>'); document.write('<script>if(returnCitySN.cip != "218.85.37.13"){');//本地IP document.write('disable_choose()'); document.write('}</script>'); function disable_choose(){ document.oncontextmenu=function(evt){evt.preventDefault();}//禁止鼠标右键 document.onselectstart=function(evt){evt.preventDefault();}//禁止选择 document.ondragstart=function(evt){evt.preventDefault();}//禁止拖放 } |
转载请注明:DEDEcms» JS禁止其他域名打开,限制域名不是指定域名访问提示
标签: