if (window.top !== window.self) { // are you trying to put self in an iframe?
try {
if (window.top.location.host) { // this is illegal to access unless you share a non-spoofable document domain
// fun times
} else {
bust(); // chrome executes this
}
} catch (ex) {
bust(); // everyone executes this
}
}js 判断是当前页是否在框架的最顶层
最新推荐文章于 2025-03-21 15:03:08 发布
本文提供了一段JavaScript代码,用于检查并阻止网站在iframe中自我加载,确保网页安全。
1308

被折叠的 条评论
为什么被折叠?



