Friday 26 March 2010

How onload functon works in javascript?

Write below code in your page

<script>
window.onload = function(){ alert("welcome"); }
</script>


As soon as page will load, an alert will be popuped with 'welcome' message.

Cheers!

No comments:

Post a Comment