欢迎来到路由器窝!

JS禁止其他域名打开,限制域名不是指定域名访问提示

浏览次数:

作者: 路由器窝

信息来源:

更新日期: 2020-02-15 16:06

文章简介

var rootSecDomain = location.host.split(.).slice(1).join(.);var arrDomain = [***,***,***,***,***,***,***,***,***,baidu.cn];if(a

  • 正文开始
  • 相关文章
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禁止其他域名打开,限制域名不是指定域名访问提示

标签:
上一页:自适应网站内容页面图片自适应
下一页:百度编辑器过滤TABLE
最近更新作品
城市联动提交表单
更新时间:2020-11-17

169人已经看过了!

统计栏目文章数量有的显示数量没有显示0
更新时间:2020-11-15

135人已经看过了!

自定义表单列表添加全选
更新时间:2020-10-19

157人已经看过了!

自定义表单展现样式
更新时间:2020-10-19

165人已经看过了!

Body里面多了个&amp;#65279字符,空白一行解决办法
更新时间:2021-01-25

168人已经看过了!

自定义证书添加图片
更新时间:2020-07-15

235人已经看过了!

dede导出证书查询数据到excel
更新时间:2020-06-19

287人已经看过了!

dedecms--会员信息导出excel表格
更新时间:2020-06-19

172人已经看过了!

dede 获取图集里面图片的数量
更新时间:2020-05-25

176人已经看过了!

织梦栏目做成列表分页(小说列表)
更新时间:2020-05-08

215人已经看过了!