Toggle navigation
Home
Latest pastes
FAQ
Random
Register
Login
javascript countdown
SUBMITTED BY:
Guest
DATE:
Jan. 5, 2014, 2:56 a.m.
FORMAT:
Text only
SIZE:
331 Bytes
Raw
Download
Tweet
HITS:
1296
Go to comments
Report
var count=30;
var counter=setInterval(timer, 1000); //1000 will run it every 1 second
function timer()
{
count=count-1;
if (count <= 0)
{
clearInterval(counter);
//counter ended, do something here
return;
}
//Do code for showing the number of seconds here
}
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus