防止网页被嵌入框架的代码
try{ top.location.hostname; //Chrome不报错 if (top.location.hostname != window.location.hostname) { top.location.href =window.location.href; //其他浏览器有异常 }}catch(e){ top.location.href = ...