run js onload code example
Example 1: how to call a function as soon as a page loads javascript
<body onload="yourFunction()"> </body>
Example 2: javascript execute code on page load
<html>
<body onload="loaded();"></body>
<script>
function loaded() {
alert('Page is loaded');
}
</script>
</html>
Example 3: run on load js
function codeAddress() {
alert('ok');
}
window.onload = codeAddress;
Example 4: javascript onload
<body onload="myFunction()">