只好用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框架的:<iframe src="test.html" id="iframe1" width="700" height="300" frameborder="0" scrolling="auto"></iframe>
透明处理<iframe src="{{$root_url}}/activity.php?m=free_order&a=iframe" allowTransparency="true" frameborder=0 name='iframe1' style="background:none; height:30px"></iframe>
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框架的:<iframe src="test.html" id="iframe1" width="700" height="300" frameborder="0" scrolling="auto"></iframe>
透明处理<iframe src="{{$root_url}}/activity.php?m=free_order&a=iframe" allowTransparency="true" frameborder=0 name='iframe1' style="background:none; height:30px"></iframe>
跨窗体选中单选按钮
本文介绍了一种使用DOM方法与jQuery相结合的技术来实现跨父窗口与IFRAME选中所有单选按钮的方法。具体包括:1. 在父窗口中通过jQuery选择IFRAME内的所有单选按钮并设置为选中状态。2. 在IFRAME内部操作父窗口中的所有单选按钮并设置为选中状态。
177

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



