The simple time prompts the DEMO to keep timing from 0

  • 2020-03-29 23:50:43
  • OfStack

You can use it later
 
<html> 
<head> 
<script type="text/javascript"> 
var c=0 
var t 
function timedCount() 
{ 
document.getElementById('txt').value=c 
c=c+1 
t=setTimeout("timedCount()",1000) 
} 
</script> 
</head> 

<body> 

<form> 
<input type="button" value=" Start the clock! " onClick="timedCount()"> 
<input type="text" id="txt"> 
</form> 
<p> Click the button above   The input field will go from  0  Start timing all the time. </p> 
 If there are other forms , It's easy to modify , Things like hidden timers , Timing bomb box  
</body> 
</html> 

Related articles: