在子窗口中操作父窗口:$(window.parent.document)
接下来就可以继续获取iframe内的dom了。
获取iframe内的dom对象有两种方法
1 $(window.frames["iframeChild"].document).find("#child")
2 $("#child",window.frames["iframeChild"].document)
1.在父窗口中操作 选中IFRAME中的所有单选按钮
代码如下:
$(window.frames["iframeChild"].document).find("input[@type='radio']").attr("checked","true");
2.在IFRAME中操作 选中父窗口中的所有单选按钮
代码如下:
$(window.parent.document).find("input[@type='radio']").attr("checked","true");
Copyright © 2019- jianjh.cn 版权所有
违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com
本站由北京市万商天勤律师事务所王兴未律师提供法律服务