如何在iframe中欺骗一个iframe页面加载非

How I can cheat an iframe page to be load non in iframe?

本文关键字:iframe 一个 加载 欺骗      更新时间:2023-09-26

在这种情况下,我希望在example.com中编写的假设javascript代码返回相同的结果:

window.self===window.top

<html>
 <body>
  <iframe id="you-are-not-an-iframe"  src="http://example.com"></iframe>
 </body>
</html>

浏览器安全模型禁止您在框架中显示第三方网站,而网站被告知它在顶部框架中运行。顺便说一句:在远程页面不希望发生这种情况的情况下,将其显示在框架中是邪恶的IMHO。