Call A JavaScript Function After Page Load

Few minutes back i wrote an example How can we call a javascript function before page load. Now i am dealing how to call a function after page loaded. All we need to do is just add an on load JavaScript function at the bottom of the page.

See how we can call a JavaScript function after page load.

<html>
<script language='javascript'>
function myFunction(){
   alert('helo');
}
</script>
<body>
<h1>Call JavaScript Function after page loaded</h1>

<script>
//call after page loaded
window.onload=myFunction;
</script>
</body>
</html>

Share This Post

Related Articles

2 Responses to “Call A JavaScript Function After Page Load”


  1. [...] Call A JavaScript Function After Page Load – How can we call a javascript function before page [...]

Leave a Reply

*