兼容:判断 iframe 是否加载完成
判断 iframe 是否加载完成其实与 判断 JavaScript 文件是否加载完成 采用的方法很类似
var iframe = document.createElement("iframe");
iframe.src = "http://www.planabc.net"; if (iframe.attachEvent){
iframe.attachEvent("onload", function(){
alert("Local iframe is now loaded.");
});
} else {
iframe.onload = function(){
alert("Local iframe is now loaded.");
};
} document.body.appendChild(iframe);
IE 支持 iframe 的 onload 事件,不过是隐形的,需要通过 attachEvent 来注册。
兼容:判断 iframe 是否加载完成的更多相关文章
- 判断 iframe 是否加载完成的完美方法
一般来说,我们判断 iframe 是否加载完成其实与 判断 JavaScript 文件是否加载完成 采用的方法很类似:var iframe = document.createElement(" ...
- 用JS实现判断iframe是否加载完成
本文出至:新太潮流网络博客 var iframe = document.createElement("iframe"); iframe.src = "blog.iinu. ...
- js下判断 iframe 是否加载完成的完美方法
一般来说,我们判断 iframe 是否加载完成其实与 判断JavaScript 文件是否加载完成. 采用的方法很类似: var iframe = document.createElement( ...
- js 判断iframe是否加载完毕
js 判断iframe是否加载完毕 CreationTime--2018年9月13日15点30分 Author:Marydon 1.javascript实现 window.onload = fun ...
- jQuery load() 判断 iframe 是否加载完毕
判断 iframe 是否加载完毕 方法.jQuery load() var frm = document.getElementById('myiframe'); $(frm).load(functi ...
- 判断 iframe 是否加载完毕
我能想到的有以下几种方式: 方法一.jQuery load() var frm = document.getElementById('myiframe'); $(frm).load(function( ...
- 判断iframe是否加载完成的完美方法
var iframe = document.createElement("iframe"); iframe.src = "http://www.jb51.net" ...
- 完美判断iframe是否加载完成
var iframe = document.createElement("iframe"); iframe.style.width = "265px"; ifr ...
- [javascript] 判断 iframe 是否加载完成
from http://www.planabc.net/2009/09/22/iframe_onload/ var iframe = document.createElement("ifra ...
随机推荐
- Java [Leetcode 100]Same Tree
题目描述: Given two binary trees, write a function to check if they are equal or not. Two binary trees a ...
- Java [leetcode 17]Letter Combinations of a Phone Number
题目描述: Given a digit string, return all possible letter combinations that the number could represent. ...
- js判断checkbox是否已选
代码: <h2>Default</h2> @using (Html.BeginForm()) { <ul> <li>@Html.CheckBox(&qu ...
- stm32 DAC输出音频
#define DAC_DHR8R1_Address 0x40007410 // Init Structure definition DAC_InitTypeDef DAC_InitStructure ...
- MD5加密帮助类
using System; using System.Collections.Generic; using System.Text; namespace AIMSCommon { /// <su ...
- Javascript 对输入框中的内容进行 “全选/反选”
<</span>script> document.write("<</span>ul>"); for(var i=0;i<&l ...
- [Bhatia.Matrix Analysis.Solutions to Exercises and Problems]ExI.5.7
Prove that for any vectors $$\bex u_1,\cdots,u_k,\quad v_1,\cdots,v_k, \eex$$ we have $$\bex |\det(\ ...
- win7下代替IDM的下载工具
EagleGet 批量下载干刚刚的!!!!! 立马卸载IDM,哈哈哈 下载地址(免费软件) http://pan.baidu.com/s/1ntupiZJ
- Zabbix探索:Proxy没有回传任何数据
因为Zabbix使用Puppet搭建的,实际上是通过脚本安装的,为了偷懒,将脚本都写一块去了,后来发现Proxy的配置和Zabbix的配置不同,又偷懒一次,复制了一下,但是为了调整脚本使用的便捷性,将 ...
- Java 时间转换问题总结
这几天开发中遇到时间转换出错的问题,特总结如下: ========================================================================= ...