Windows timer : setTimeout « Window Browser « JavaScript DHTML






Windows timer

 

<html>
<head>
<title>timer</title>
<script type="text/javascript">
function sendAlert() {
    document.write("Hello");
}
function startTimer() {
    var timerID = window.setTimeout(sendAlert,8000);
}
</script>
</head>
<body onload="startTimer();">
<p>Hello</p>
</body>
</html>

   
  








Related examples in the same category

1.meta http-equiv="refresh" content="30" and timer
2.Start a timer and cancel a timer
3.Load image with timer