我一直在研究Framebustingbuster(名称中的含义,呵呵),它使我的用户留在我的页面上并打开一个包含目标URL的新窗口。我正在使用Lightbox脚本来显示iframe,这就是我正在做的:1)为所有.lightbox点击添加了一个事件,例如:$('.lightbox').live("click",function(e){e.preventDefault();$('#redirectURL').val($(this).attr('href'));$(this).lightbox();}2)添加了一个framebustingbuster:varprevent_bust=0win
假设您不希望其他网站在中“框定”您的网站:因此,您将反框架、框架破坏JavaScript插入到所有页面中:/*breakusoutofanycontainingiframes*/if(top!=self){top.location.replace(self.location.href);}太棒了!现在,您会自动“破坏”或突破任何包含iframe的内容。除了一个小问题。事实证明,你的框架破坏代码可能会被破坏,asshownhere:varprevent_bust=0window.onbeforeunload=function(){prevent_bust++}setInterval(fu
假设您不希望其他网站在中“框定”您的网站:因此,您将反框架、框架破坏JavaScript插入到所有页面中:/*breakusoutofanycontainingiframes*/if(top!=self){top.location.replace(self.location.href);}太棒了!现在,您会自动“破坏”或突破任何包含iframe的内容。除了一个小问题。事实证明,你的框架破坏代码可能会被破坏,asshownhere:varprevent_bust=0window.onbeforeunload=function(){prevent_bust++}setInterval(fu