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 ...
随机推荐
- Objective-C语法之NSArray和NSMutableArray
转自:http://www.cnblogs.com/stoic/archive/2012/07/09/2582773.html Objective-C的数组比C++,Java的数组强大在于,NSArr ...
- C语言的ANSI/ISO标准
摘自:http://see.xidian.edu.cn/cpp/html/1658.html 从技术上讲有两种C语言标准,一种来自ANSI(American National Standard Ins ...
- Helpers\ReservedWords
Helpers\ReservedWords This helper returns an array of reserved words, this includes php 7's new rese ...
- Android(java)学习笔记106-1:深入分析Java ClassLoader原理
1. 前言: Android中的动态加载机制能更好的优化我们的应用,同时实现动态的更新,这就便于我们管理我们的应用,通过插件化来减轻我们的内存以及CPU消耗,在不发布新版本的情况下能更新某些模块. 当 ...
- Redis' High Availability
Redis Sentinel is a system designed to help managing Redis instances. It performs the following thre ...
- java 网络编程 模拟browser
--java模拟实现browser,主要代码: package socket; import java.io.*; import java.net.*; public class MyHttpClie ...
- Mac下批量打包
两种方式: 第一种:有源码 这种方式比较 简单.利用ant打包.直接shell脚本修改 配置渠道号的文件.我们目前是用的umeng的.在AndroidManifest.xml里.提供一个简单的修改渠道 ...
- 学习css简单内容
Css的class,ID和上下文选择符 Class选择符. Class选择符用来配置某一类css规则,将其应用到网页中一个或多个区域.配置一类样式时,要将选择符配置成类名.在类名前加(.).类名必须以 ...
- Mac环境下svn的使用(转载)
在Windows环境中,我们一般使用TortoiseSVN来搭建svn环境.在Mac环境下,由于Mac自带了svn的服务器端和客户端功能,所以我们可以在不装任何第三方软件的前提下使用svn功能,不过还 ...
- Java Concurrency - Fork/Join Framework
Normally, when you implement a simple, concurrent Java application, you implement some Runnable obje ...