Friday, September 7, 2007

Sleep Function Using JavaScript

<html>
<head>
<script language='javascript'>
function sleep()
{

var Sleep = setTimeout("alert('Hi Have A Nice Time And Day ')",2000);    
             // 2000 Millisecond(2 sec)

}
</script>
<body onload='sleep()'>
Alert Box Will Be Displayed After 2 Seconds the Body is Loaded
</body>
</html>

Note: Tested In IE 7


Program Demo


No comments:

Creative Commons License
Disclaimers:We have tried hard to provide accurate information, as a user, you agree that you bear sole responsibility for your own decisions to use any programs, documents, source code, tips, articles or any other information provided on this Blog.