Usually we call a function during page on load with following two methods.

<body onload="happycode() ;">


window.onload=happycode ;

But how can we call a JavaScript function after page is loaded?. I solved it by using a very simple method, it did exactly what i want and call after page and content is loaded.

Just add an onload function at the end of the body. :)

<script language='javascript'>
function happycode(){
<h1>Javascript call after page loaded</h1>
//call after page loaded
window.onload=happycode ; 
Tags :
Founder of and, love Java and open source stuff. Follow him on Twitter, or befriend him on Facebook or Google Plus. If you like my tutorials, consider make a donation to these charities.

Related Posts

Popular Posts