onload event
Example
Execute JavaScript code when the page has finished loading:
Try it »
(See more examples at the bottom of the page)
Definition and Usage
The onload event occurs immediately after the page or image has finished loading.
onload is usually used on the element to execute script code after the page is fully loaded (including images, css files, etc.).
Syntax
In HTML:



All major browsers support the onload event
Event Object