Created
July 25, 2012 02:50
-
-
Save libo1106/3174103 to your computer and use it in GitHub Desktop.
check iframe is onloaded
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment