firefox中操作frame
A是主页面,里面包括两个frame页面B和C
B:在B中操作C的javascript方法viewChangePassword()
window.parent.document.getElementsByTagName("frame")['mframe'].contentWindow.viewChangePassword();
firefox和IE访问frame是不一样的。
在IE里
1:window.parent.document.getElementsByTagName("frame")['mframe'].contentWindow.viewChangePassword();
2:window.parent.document.getElementById("mframe").viewChangePassword();
3:window.parent.document.getElementsByTagName("frame")[2].viewChangePassword();
在firefox里只能有一种方法,就是本文开始的方法。
本文介绍了在Firefox和IE浏览器中如何从一个主页面A操作嵌套的frame页面B和C的方法。对于Firefox,需要使用特定的方法来调用frame C中的JavaScript函数viewChangePassword()。而在IE中,则提供了多种方式来实现相同的功能。
6692

被折叠的 条评论
为什么被折叠?



