JQuery跨Iframe选择实现代码
2010-08-19 00:00
525 查看
从父页面中选择iframe中的元素:
从iframe页面中选择父页面中的元素:
以下内容是别的网友的解决方法:
只好用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>
IE7中测试通过
$('#btnCancel',$('#PopFrame')[0].contentWindow.document)
从iframe页面中选择父页面中的元素:
$("#PopContainer",parent.document)
以下内容是别的网友的解决方法:
只好用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>
IE7中测试通过
相关文章推荐
- JQuery跨Iframe选择实现代码
- jquery实现商品拖动选择效果代码(自写)
- jquery使用iframe实现HTML页面局部刷新代码
- jquery 查找iframe父级页面元素的实现代码
- 基于jquery实现的一个选择中国大学的弹框 (数据、步骤、代码)
- jquery 查找iframe父级页面元素的实现代码
- JQuery与iframe交互实现代码
- jQuery为iframe的body添加click事件的实现代码
- JQuery里选择超链接的实现代码
- Jquery模拟的select点击选择实现代码
- JQuery与iframe交互实现代码
- jquery实现iframe自适应高度代码
- 基于jquery的选择标签至文本域效果,可多选/可过滤重复/可限制个数的实现代码
- jquery实现商品拖动选择效果代码(自写)
- JQuery里选择超链接的实现代码
- 基于jquery实现的可以编辑选择的下拉框的代码
- jQuery为iframe的body添加click事件的实现代码
- JQuery里选择超链接的实现代码
- 基于jQuery实现仿51job城市选择功能实例代码