【发布时间】:2015-03-10 15:44:19
【问题描述】:
我在重定向 iFrames Redirect parent window from an iframe action 上看到了这个问题,但答案涉及重定向整个页面。
重定向使用的是:
window.top.location.href = "http://www.example.com";
有没有办法重定向嵌套的 iFrame?
即。
<browser>
<iframe src="someSrc">
<!--iFrame page-->
<iframe src="nestedSrc"></iframe>
</iframe>
</browser>
所以从nestedSrc重定向someSrc到另一个页面而不是重定向浏览器页面。
【问题讨论】:
标签: javascript html redirect iframe