ojavascript on page load code example
Example 1: how to call a function as soon as a page loads javascript
<body onload="yourFunction()"> </body>
Example 2: document load javascript
window.onload = function() {
// Code here
}
<body onload="yourFunction()"> </body>
window.onload = function() {
// Code here
}