jaavscript onload code example
Example 1: window.onload
window.onload = function() {
// Some code
};
Example 2: javascript onload
<body onload="myFunction()">
window.onload = function() {
// Some code
};
<body onload="myFunction()">