how i can run function when the page load in javascript code example
Example: javascript execute code on page load
<html>
<body onload="loaded();"></body>
<script>
function loaded() {
alert('Page is loaded');
}
</script>
</html>