现在解决的不是一个id就能搞定的问题,突然觉得自己好屌!


代码里面的iframe标签都是ExtJs打上去的,所以根本没去花精力去找生成的地方,

即使找到了,修改框架也是不科学的,


不废话了,开始使用的是:

varalla=window.parent.frames;for(iinalla){console.log(alla[i].location.href);if(alla[i].location.pathname=='对应的iframe链接'){alla[i].location.reload();}}

这么做,之后一刷新,OK了,激动的我 不要不要的!

...然而,在谷歌上一跑,报错了,获取不到.pathname,

原因是谷歌只能获取最顶级的iframe,

而火狐可以获取嵌套的所有iframe, 把parent换成top也不好使

最后

<script>varalla=window.parent.window.document.getElementsByTagName('iframe');for(iinalla){console.log(alla[i].getAttribute('src'));if(alla[i].getAttribute('src')=='live/index'){alla[i].src='live/index';}}</script>

搞定了,于是自己吊炸天了