从另一个iframe重新加载iframe [英] Reloading iframe from another iframe

查看:162
本文介绍了从另一个iframe重新加载iframe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以从其他子iframe(__content_iframe)重新加载iframe(例如__tree_iframe)吗?

Can I reload iframe (say __tree_iframe) from another child iframe (__content_iframe)?

难度:IE6 / 7。

Difficulty: IE6/7.

更新

显然我应该使用window.opener并使用iframes属性查找iframe。显然,IE不支持window.opener。有关另一种方式的想法吗?

Obviosly I should use window.opener and find iframe using it iframes property. Apparently, IE doesn't support window.opener. Any ideas about another way?

推荐答案

如果您在父框架中访问iframe时遇到问题,最好给它一个ID。那么应该可以做一个

If you have trouble accessing the iframe in the parent frame, best give it an ID. Then it should be possible to do a

parent.getElementById("frameid").location.reload()

如果父,子和兄弟都在同一个域中。

if both parent, child and sibling are in the same domain.

这篇关于从另一个iframe重新加载iframe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆