meta http-equiv="refresh" content="30" and timer : setTimeout « Window Browser « JavaScript DHTML






meta http-equiv="refresh" content="30" and timer

  
<html>
<head>
<title>A Simple Page</title>
<meta http-equiv="refresh" content="30">
<script language="JavaScript">
var x=30;
function startClock(){
    x = x - 1;
    document.form1.clock.value = x;
    timerID=setTimeout("startClock()", 1000);
}
</script>
</head>
<body onload="startClock()">
<form name="form1">
<input type="text" name="clock">
</form>
</body>
</html>

   
    
  








Related examples in the same category

1.Windows timer
2.Start a timer and cancel a timer
3.Load image with timer