1var count=25;
2
3var counter=setInterval(timer, 1000); //1000 will run it every 1 second
4
5function timer()
6{
7 count=count-1;
8 if (count <= 0)
9 {
10 clearInterval(counter);
11 return;
12 }
13
14 document.getElementById("timer").innerHTML=count; // watch for spelling
15 }
16