js 获取iframe中的元素
今天要修改编辑器插件中的元素遇到的问题
jquery
在父窗口中获取iframe中的元素
1.Js代码
- 格式:$("#iframe的ID").contents().find("#iframe中的控件ID").click();//jquery 方法1
- 实例:$("#ifm").contents().find("#btnOk").click();//jquery 方法1
2.Js代码
- 格式:$("#iframe中的控件ID",document.frames("frame的name").document).click();//jquery 方法2
- 实例:$("#btnOk",document.frames("ifm").document).click();//jquery 方法2
在iframe中获取父窗口的元素
- 格式:$('#父窗口中的元素ID', parent.document).click();
- 实例:$('#btnOk', parent.document).click();
--------------
source:【1】js、jquery获取ifream中的元素
js 获取iframe中的元素的更多相关文章
- js获取iframe中的元素以及在iframe中获取父级的元素(包括iframe中不存在name和id的情况)
第一种情况:iframe中不存在name和id的方法:(通过contentWindow获取) var iframe = document.getElementsByTagName('iframe' ...
- js获取iframe中的元素
var obj=document.getElementById("iframe的name").contentWindow; var ifmObj=obj.document.getE ...
- Js/Jquery获取iframe中的元素
转载: Js/Jquery获取iframe中的元素 - - ITeye技术网站http://java-my-life.iteye.com/blog/1275205 在web开发中,经常会用到ifram ...
- Js/Jquery获取iframe中的元素 在Iframe中获取父窗体的元素方法
在web开发中,经常会用到iframe,难免会碰到需要在父窗口中使用iframe中的元素.或者在iframe框架中使用父窗口的元素 js 在父窗口中获取iframe中的元素 1. 格式:window ...
- 【学习】如何用jQuery获取iframe中的元素
(我的博客网站中的原文:http://www.xiaoxianworld.com/archives/292,欢迎遇到的小伙伴常来瞅瞅,给点评论和建议,有错误和不足,也请指出.) 说实在的,以前真的很少 ...
- 父窗口中获取iframe中的元素
js 在父窗口中获取iframe中的元素 1. 格式:window.frames["iframe的name值"].document.getElementById("ifr ...
- 获取父窗口元素或者获取iframe中的元素(相同域名下)
jquery方法 在父窗口中获取iframe中的元素 //方法1 $("#iframe的ID").contents().find("iframe中的元素"); ...
- 获取iframe中的元素
父窗口中获取iframe中的元素 var ifr = document.getElementById('suggustion').contentWindow.document.body; 在ifram ...
- 在iframe窗体内 获取父级的元素;;在父窗口中获取iframe中的元素
在iframe中获取父窗口的元素 $(‘#父窗口中的元素ID’, parent.document).click(); 在父窗口中获取iframe中的元素 $(“#iframe的ID”).content ...
随机推荐
- bat批处理完成jdk tomcat的安装
在完成一个web应用项目后,领导要求做一个配置用的批处理文件,能够自动完成jdk的安装,tomcat的安装,web应用的部署,环境变量的注册,tomcat服务的安装和自动启动 参考了网上很多的类似的批 ...
- LeetCode Patching Array
原题链接在这里:https://leetcode.com/problems/patching-array/ 题目: Given a sorted positive integer array nums ...
- Java中的集合框架
概念与作用 集合概念 现实生活中:很多事物凑在一起 数学中的集合:具有共同属性的事物的总体 java中的集合类:是一种工具类,就像是容器,储存任意数量的具有共同属性的对象 在编程时,常常需要集中存放多 ...
- [SLAM]2D激光线特征提取
Nguyen, V., et al. (2007)."A comparison of line extraction algorithms using 2D range data for i ...
- Solr6.2.0 + zookeeper 集群配置
zookeeper1 : 192.168.1.103zookeeper2 : 192.168.1.104zookeeper3 : 192.168.1.105solr1 : 192.168.1.106s ...
- cmdb models数据库结构
from __future__ import unicode_literals from django.contrib.auth.models import User from django.db i ...
- ubuntu编译运行xv6
最近想找个简单的类Unix系统学习下, xv6不错的, 所有代码加起来不到一万行,首先把代码跑起来还是很重要的. # 下载xv6源码并编译 git clone git://pdos.csail.mit ...
- grub paramiter & menu.list
在Linux中,给kernel传递参数以控制其行为总共有三种方法: 1.build kernel之时的各个configuration选项. 2.当kernel启动之时,可以参数在kernel被GRUB ...
- 【转】ACM/ICPC生涯总结暨退役宣言—alpc55
转自:http://hi.baidu.com/accplaystation/item/ca4c2ec565fa0b7fced4f811 ACM/ICPC生涯总结暨退役宣言—alpc55 前言 早就该写 ...
- 9.请写出PHP5权限控制修饰符
1.public:public表明该数据成员.成员函数是对所有用户开放的,所有用户都可以直接进行调用 2.private:private表示私有,私有的意思就是除了class自己之外,任何人都不可以直 ...