代码里面的iframe标签都是ExtJs打上去的,所以根本没去花精力去找生成的地方,
即使找到了,修改框架也是不科学的,
不废话了,开始使用的是:
var alla = window.parent.frames; for( i in alla){ console.log(alla[i].location.href); if(alla[i].location.pathname=='对应的iframe链接'){ alla[i].location.reload(); } } 这么做,之后一刷新,OK了,激动的我 不要不要的!
...然而,在谷歌上一跑,报错了,获取不到.pathname,
原因是谷歌只能获取最顶级的iframe,
而火狐可以获取嵌套的所有iframe, 把parent换成top也不好使
最后
var alla = window.parent.window.document.getElementsByTagName('iframe'); for( i in alla){ console.log(alla[i].getAttribute('src')); if(alla[i].getAttribute('src')=='live/index'){ alla[i].src='live/index'; } } 搞定了,于是自己吊炸天了
查看更多关于iframe标签嵌套,刷新问题_html/css_WEB-ITnose的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did114747