jquery获取iframe中的dom对象
父窗口中操作iframe:$(window.frames["iframeChild"].document) //假如iframe的id为iframeChild
在子窗口中操作父窗口:$(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");
jquery获取iframe中的dom对象的更多相关文章
- Jquery-获取iframe中的dom对象
父窗口中操作iframe: $(window.frames["iframeChild"].document) //假如iframe的id为iframeChild 在子窗口中操作父窗 ...
- Js/Jquery获取iframe中的元素
转载: Js/Jquery获取iframe中的元素 - - ITeye技术网站http://java-my-life.iteye.com/blog/1275205 在web开发中,经常会用到ifram ...
- JQuery获取iframe中window对象的方法-contentWindow
document.getElementsByTagName('iframe')[0].contentWindow 获取到的就是iframe中的window对象.
- 【学习】如何用jQuery获取iframe中的元素
(我的博客网站中的原文:http://www.xiaoxianworld.com/archives/292,欢迎遇到的小伙伴常来瞅瞅,给点评论和建议,有错误和不足,也请指出.) 说实在的,以前真的很少 ...
- javascript 获取iframe中的dom
太扯了,一个多小时都没搞定,获取不到iframe中的dom元素. <div id="one"> this is one </div> <div> ...
- Js/Jquery获取iframe中的元素 在Iframe中获取父窗体的元素方法
在web开发中,经常会用到iframe,难免会碰到需要在父窗口中使用iframe中的元素.或者在iframe框架中使用父窗口的元素 js 在父窗口中获取iframe中的元素 1. 格式:window ...
- Jquery获取iframe中的元素
iframe与父页面之间相互获取元素的方法: 1.从父页面中获取iframe页面中的元素: 用法: $(window.frames["iframe_include_adverse" ...
- jquery获取html中当前元素对象,以及父对象,相邻的上一个对象,或下一个对象
jsp代码: <span><input type="hidden" value="1" id="newInfo">& ...
- 如何利用JQuery获取iframe内联框架对象?
parent.$("#iframeID").get(0).contentWindow; 父.$("选择器").get(0).contentWindow; get ...
随机推荐
- Python Generators(生成器)--yield
参考:http://blog.csdn.net/scelong/article/details/6969276 Python生成器 什么是python生成器,意思是带有一个yield语句的函数,既然它 ...
- php 常用正则表达式
判断“正浮点数”: preg_match('/^(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*) ...
- 服务器控件HyperLink的NavigateUrl绑定传参问题
<asp:HyperLink ID="HyperLink1" NavigateUrl='<%# Eval("ProjectID","Mar ...
- RTB广告展示分步说明
原文:http://contest.ipinyou.com/cn/manual.shtml RTB (Real Time Bidding, 实时竞价) 是近年来计算广告领域最激动人心的进展之一. 它增 ...
- UVA 10006 - Carmichael Numbers 数论(快速幂取模 + 筛法求素数)
Carmichael Numbers An important topic nowadays in computer science is cryptography. Some people e ...
- iOS开发之 动画CoreAnimation
http://blog.treney.com/index.php/archives/CoreAnimation.html?hmsr=toutiao.io&utm_medium=toutiao. ...
- Maven学习小结(七 生命周期[转])
Maven2的阶段(生命周期)说明:Maven2拥有三套独立的生命周期,Maven的命令也是基于这些生命周期来说的.1.clean:清理先前构建的构件,又分为下面三个下阶段: a.pre-clean ...
- Integer的缓存和自动拆装箱
先看一个简单的例子: public class TestInteger { public static void main(String[] args) { System.out.println(&q ...
- python(3)-动态参数实现字符串格式化
s1 = "{0} ===> {1}" s = s1.format('lilei', 'boy') print(s) l = ['lilei', 'boy'] s = s1. ...
- 同步的数据过大,导致shareplex超时,并自动kill掉了同步会话
数据库迁移,其中有个数据量较大的表的索引,在迁移的时候出现,同步超时的情况 Notice 2014-08-05 15:14:54.856107 14240 3892311808 Poster: Ope ...