Menu
I have created a 30:00 Countdown Clock but when it gets to 9 seconds in
the seconds field it shows a 9 instead of 09
Example
This is what I get: 29:9
This is what I need: 29:09
Not sure how to do it, I am new to working with JavaScript
<form name=”counter”><input type=”text” size=”8″
name=”d2″></form>
<script>
<!–
//
var minutes=30
var seconds=00
document.counter.d2.value=’30:00′
function display(){
if (seconds<=0){
minutes-=1
seconds+=59
}
if (minutes<=-1){
minutes==1
seconds=0
}
else
seconds-=1
document.counter.d2.value=minutes+”:”+seconds
setTimeout(“display()”,1000)
}
display()
–>
</script>