判断 iframe 是否加载完成的完美方法
frome http://www.planabc.net/2009/09/22/iframe_onload/
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);
posted on 2014-02-09 14:51 passer1991 阅读(155) 评论(0) 编辑 收藏 举报