标签:pre frame color code something UNC nload 方法 lse
var frm = document.getElementById(‘myiframe‘); $(frm).load(function(){ // 等iframe加载完毕 dosomething(); });
var iframe = document.createElement("myiframe"); iframe.src = "http://www.baidu.com"; if (!/*@cc_on!@*/0) { //如果不是IE,IE的条件注释 iframe.onload = function(){ alert("Local iframe is now loaded."); }; } else { iframe.onreadystatechange = function(){ // IE下的节点都有onreadystatechange这个事件 if (iframe.readyState == "complete"){ alert("Local iframe is now loaded."); } }; } document.body.appendChild(iframe);
var iframe = document.createElement("iframe"); iframe.src = "http://www.baidu.com"; if (iframe.attachEvent){ iframe.attachEvent("onload", function(){ // IE alert("Local iframe is now loaded."); }); } else { iframe.onload = function(){ // 非IE alert("Local iframe is now loaded."); }; } document.body.appendChild(iframe);
标签:pre frame color code something UNC nload 方法 lse
原文地址:https://www.cnblogs.com/Tohold/p/10690180.html