只好用dom方法与jquery方法结合的方式实现了
1.在父窗口中操作 选中iframe中的所有单选钮
$(window.frames[iframe1].document).find(”input[@type='radio']“).attr(”checked”,”true”);
2.在iframe中操作 选中父窗口中的所有单选钮
$(window.parent.document).find(”input[@type='radio']“).attr(”checked”,”true”);
iframe框架的:
ie7中测试通过
代码:
复制代码 代码如下:
jquery控制iframe
使用jquery操作iframe1、内容里有两个ifame
2、如果内容里面有一个id为mainiframe的ifame
ifame包含一个someid
you want to get this content
得到someid的内容
$(#mainiframe).contents().find(someid).html() html 或者 $(#mainiframe).contains().find(someid).text()值
3、在父窗口中操作 选中iframe中的所有单选钮
$(window.frames[iframe1].document).find(input[@type='radio']).attr(checked,true);
那选择id自然就是依然使用find方法
$(window.frames[iframe1].document).find(#id)