firefox中操作frame与IE中操作frame的异同

来源:互联网 发布:电工证淘宝 编辑:程序博客网 时间:2024/05/07 16:35

firefox中操作frame

A是主页面,里面包括两个frame页面B和C
B:在B中操作C的javascript方法viewChangePassword()

window.parent.document.getElementsByTagName("frame")['mframe'].contentWindow.viewChangePassword();

firefox和IE访问frame是不一样的。
在IE中操作frame
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里只能有一种方法,就是本文开始的方法。

原创粉丝点击