Javascript examples for DOM HTML Element:Image
Image complete Property - Check to see if the image is finished loading on body onload:
<!DOCTYPE html> <html> <head> <script> function myFunction() {/*from ww w. ja v a 2s. co m*/ console.log("Image loaded: " + document.getElementById("myImg").complete); } </script> </head> <body onload="myFunction()"> <img id="myImg" src="http://java2s.com/resources/a.png" alt="alt message" width="107" height="98"> </body> </html>