本代码片段可以防止网站页面被iframe嵌套。
(function(window,document){
if(top != window){
top.location = location.href;
}
document.uniqueID != document.uniqueID && !!location.hash && (location.hash = location.hash);
window.focus();
})(this,document);
关于uniqueID 可以参考:http://zhangyaochun.iteye.com/blog/1673533

本文提供了一段代码片段,用于阻止网站页面被iframe嵌套加载,通过设置top窗口和uniqueID来实现防iframe嵌套功能。
193

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



