

























碰到这样的问题,
我有一个页面main.html,里面有很多的frame,比如说a.html,b.html,c.html,d.html,e.html。。。
这些子页面,里面都有一个同名javascript的MenuButtonClass()方法
在其中一个子页面中,我会处理其它的frame是,一般会这样写
window.parent.frames(x).MenuButtonClass();
后来我这样写了
window.parent.document.getElementsByTagName("frame")[x].MenuButtonClass();
今天终于找到原因了,原来少个
contentWindow属性
window.parent.document.getElementsByTagName("frame")[x].contentWindow.MenuButtonClass();
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。