Yesterday, I found a lot of information, we find this useful, similar to the Document.ready method has not been found
Window.onload: All elements of the page loaded, including pictures
$ (document). Ready: Document structure loaded, the picture does not necessarily load
Http://zhidao.baidu.com/link?url=Z7h_mNkeKQ3y3GYWKFEm7a4VrYzXcWEwolDVdSPScaCWFID0_5d7G0xOfmecHqL7hD0FjEde0qdTAudqkaY2uq
The more silly way is to read some of the contents of the IFRAME regularly.
Nicholas C. Zakas article "IFRAMEs, onload, and Document.domain" in the comments Christopher provides a new method of Judgment (perfect):
var iframe = document.cr Eateelement ("iframe");
iframe.src = ' your URL ';
if (iframe.attachevent) {
iframe.attachevent ("onload", function () {
alert ("Local iframe are now loaded.");
});
else {
iframe.onload = function () {
alert ("Local iframe are now loaded.");
} Document.body.appendChild (IFRAME);
Ask
Thank you ~ but oh,
iframe.attachevent ("onload", function ()
This sentence and
iframe.onload
So what is the difference?
Reply
Answer:: This is for browser compatibility. IE in the creation of a new IFRAME when the OnLoad method needs to use Attachevent to bind, and the original IFrame of the OnLoad method, you can directly bind. You put two alert ("Local iframe are now loaded."); Change the information to a different try. IE opens the previous one, and FF opens the latter one.