Run ❯
Get your
own
website
Result Size:
625 x 565
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <head> <script> function loadImage() { alert("Image is loaded"); } </script> </head> <body> <h1>JavaScript HTML Events</h1> <h2>The onload Attribute</h2> <img src="w3javascript.gif" onload="loadImage()" width="100" height="132"> </body> </html>