【发布时间】:2009-03-11 18:16:37
【问题描述】:
在 IFrame 中使用 javascript:parent.location.href 更改父窗口时,IE 会短暂更改 IFrame 内容以列出父窗口正在更改的 url。 Firefox、chrome 和opera 只是改变了父窗口。
有没有办法让 IE 跳过在 IFrame 中显示 url 而只是更改父级?
[编辑]
这里是复制它的示例代码。
iframe 页面:
<iframe id="finder" name="finder" src="content.html" scrolling="no" height="620" width="620" style="border:1px #c0c0c0 solid;"></iframe>
内容页面:
<a href='javascript:parent.location.href="http://www.google.com"'>test link</a>
【问题讨论】:
-
IE7 似乎没有这样做。可以发一些代码吗?
-
它在哪里准确显示 URL?
-
IFrame 的内容被替换为显示父级最终更改为的 URL 的文本。
标签: javascript internet-explorer iframe