我有一个基于 html 的应用程序,有时我的 html 应用程序需要在 iframe 中打开另一个 url。 问题是 iframe 中的第三方 url 也会打开一个新窗口,内容相同,url 相同。 那么我该如何预防呢?
最佳答案
这看起来像是第三方页面中的 iframe breakoutscript。有关此问题的解决方案的一些链接。
http://stuntsnippets.com/prevent-iframe-breakout/
http://www.zimbio.com/Web+Design/articles/1110/How+prevent+iFrame+breakaway
关于javascript - 防止html页面打开新窗口,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5064798/