Javascript examples for DOM Event:onload
Using onload on an <img> element.
<!DOCTYPE html> <html> <body> <img src="http://java2s.com/resources/a.png" onload="loadImage()" width="100" height="132"> <script> function loadImage() {/*from w w w .j a va 2s. c o m*/ console.log("Image is loaded"); } </script> </body> </html>