判断 iframe 是否加载完成的完美方法
var iframe = document.createElement("iframe");iframe.src = "http://www.google.com.hk";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);
页:
[1]