父窗口jquery触发iframe按钮事件(转载)
原文地址: http://blog.csdn.net/muziduoxi/article/details/11123923
<script type="text/javascript">
$(document).ready(function(e){
var iframe = document.getElementById("Box");
if (iframe.attachEvent) {
iframe.attachEvent("onload", function() {
//以下操作必须在iframe加载完后才可进行
alert('1');
});
} else {
iframe.onload = function() {
//以下操作必须在iframe加载完后才可进行
$("#Box").contents().find("#btn1").click(function(e){alert('0000133');$("#test").val("00000000000000000");return false;});//jquery 方法1
};
}
</script>
父窗口jquery触发iframe按钮事件(转载)的更多相关文章
- 父窗口中获取iframe中的元素
js 在父窗口中获取iframe中的元素 1. 格式:window.frames["iframe的name值"].document.getElementById("ifr ...
- 在iframe窗体内 获取父级的元素;;在父窗口中获取iframe中的元素
在iframe中获取父窗口的元素 $(‘#父窗口中的元素ID’, parent.document).click(); 在父窗口中获取iframe中的元素 $(“#iframe的ID”).content ...
- jquery 触发/失去焦点事件例子详解
触发焦点: $("Element").focus() 触发每一个匹配元素获得焦点事件. $("Element").focus(function) 事件会在获得焦 ...
- ASP.NET页面回车键触发Button按钮事件问题
首先了解一下Button.UseSubmitBehavior属性. 获取或设置一个布尔值,该值指示 Button 控件使用客户端浏览器的提交机制还是 ASP.NET 回发机制. 如果该控件使用了客户端 ...
- Android 触发Button按钮事件的三种方式
1.新创建一个类 2.使用内部类 3.当多个button按钮时,为简化代码而创建的实例listener 贴代码: MainActivity.Java 文件: package com.android. ...
- asp.net 页面按回车就会触发button按钮事件
转载于 https://www.cnblogs.com/anz130/articles/2445830.html 转自:http://space.itpub.net/12639172/viewspac ...
- jquery触发/失去焦点事件
触发焦点: $("Element").focus() 触发每一个匹配元素获得焦点事件. $("Element").focus(function) 事件会在获得焦 ...
- Js/Jquery获取iframe中的元素 在Iframe中获取父窗体的元素方法
在web开发中,经常会用到iframe,难免会碰到需要在父窗口中使用iframe中的元素.或者在iframe框架中使用父窗口的元素 js 在父窗口中获取iframe中的元素 1. 格式:window ...
- 父窗口 和 iframe 互相访问
在父窗口中获取iframe中的元素 1. 格式:window.frames["iframe的name值"].document.getElementByIdx_x("ifr ...
随机推荐
- Memcached telnet端命令
Command Description Example get Reads a value get mykey set Set a key unconditionally set mykey 0 60 ...
- Matlab2015基本语句语法04
1. 输入.输出.格式化输出 1) 读入数据:input >>number: num=input('Give me your number: '); >>string: str ...
- lvs/dr配置
lvs/dr Director server : DIP:192.168.1.100/24 eth0 VIP:192.168.1.101/24 eth0:0 Real server: Real1: ...
- struts2报错:There is no Action mapped for namespace [/] and action name [userAction!add]
使用struts2.3进行动态方法调用时出现: There is no Action mapped for namespace [/user] and action name [user!add] a ...
- 剑指offer 面试题64 数据流的中位数
struct cmp { bool operator()(double a, double b) { return a > b; } }; class Solution { public: vo ...
- samsung bios configuration怎么设置U盘启动
1.用第三方U盘制作软件制作U盘启动盘,并下载正版系统镜像或纯净版镜像,下载后缀为ISO的镜像文件拷贝到U盘根目录.2.开机按F2键进入BIOS设置.选择BOOT选项—Secure Boot设置为“D ...
- Android中Shape的使用
先看一下文档对Shape Drawable的描述: Shape Drawable An XML file that defines a geometric shape, including color ...
- mui消息框alert,confirm,prompt,toast
<script type="text/javascript" charset="utf-8"> //mui初始化 mui.init({ swipeB ...
- Cannot initialize Cluster. Please check your configuration for mapreduce.framework.name and the co
log4j:WARN No appenders could be found for logger (org.apache.hadoop.metrics2.lib.MutableMetricsFact ...
- <<< ajaxfileupload介绍
ajaxfileupload,jquery的一个异步上传插件,使用此插件你可以不用建立form,他会自动生成表单,且自动设置好enctype="multipart/form-data&quo ...