您的位置:首页 > Web前端 > JavaScript

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

2012-08-17 15:51 323 查看
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里只能有一种方法,就是本文开始的方法。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  firefox ie javascript c