Jump to content

Timer Countdown


mcmuney

Recommended Posts

Is there a way to modify this script to work outside of a form? Working Link

 

<form name="counter"><input type="text" size="8" 
name="d2"></form> 

<script> 
<!-- 
// 
var milisec=0 
var seconds=30 
document.counter.d2.value='30' 

function display(){ 
if (milisec<=0){ 
    milisec=9 
    seconds-=1 
} 
if (seconds<=-1){ 
    milisec=0 
    seconds+=1 
} 
else 
    milisec-=1 
    document.counter.d2.value=seconds+"."+milisec 
    setTimeout("display()",100) 
} 
display() 
--> 
</script> 

Link to comment
https://forums.phpfreaks.com/topic/170922-timer-countdown/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.