判断iframe是否加载完成


if (iframe.attachEvent){ 
iframe.attachEvent("onload", function(){ 
alert("Local iframe is now loaded."); 
}); 
} else { 
iframe.onload = function(){ 
alert("Local iframe is now loaded."); 
}; 

IE 支持 iframe 的 onload 事件 不过是隐形的,需要通过 attachEvent 来注册。 

猜你喜欢

转载自blog.csdn.net/weixin_38747509/article/details/81012025