直率篮球

文章
5
资源
0
加入时间
3年1月7天

防止网页被嵌入框架的代码

try{  top.location.hostname; //Chrome不报错  if (top.location.hostname != window.location.hostname) {    top.location.href =window.location.href; //其他浏览器有异常  }}catch(e){  top.location.href = ...