Image onload Event
Image Object
Definition and Usage
The onload event is executed immediately after the image finishes loading.
Syntax
onload="
JavaScriptCode
"
| Parameters | Description |
|---|---|
| JavaScriptCode | Required. The JavaScript code executed after the event is triggered. |
Browser support





All major browsers support the onload event
Example
Example
Pop up "Image loaded" immediately after the image finishes loading:
Try it »
Image Object