小编Mik*_*ike的帖子

如何在更改父窗口时阻止IE在IFrame中显示URL

在IFrame中使用javascript:parent.location.href更改父窗口时,IE会短暂更改IFrame内容以列出父级正在更改的URL.Firefox,chrome和opera只是更改父窗口.

有没有办法让IE跳过显示IFrame中的网址,只是更改父级?

[编辑]

这是复制它的示例代码.

iframe页面:

<iframe id="finder" name="finder" src="content.html" scrolling="no" height="620" width="620" style="border:1px #c0c0c0 solid;"></iframe>
Run Code Online (Sandbox Code Playgroud)

内容页:

<a href='javascript:parent.location.href="http://www.google.com"'>test link</a>
Run Code Online (Sandbox Code Playgroud)

javascript iframe internet-explorer

2
推荐指数
1
解决办法
2243
查看次数

标签 统计

iframe ×1

internet-explorer ×1

javascript ×1