Mega Code Archive

 
Categories / JavaScript DHTML / Window Browser
 

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>