Share this post! | Vote this! |
|
To create a countdown timer in JavaScript we will first need to make it
tick with a interval of 1000 milliseconds (1 second). To do this we have
to use the window.setTimeout function which will call a JavaScript
function after a certain amount of time, like this:
So this will call the function called Tick after 1000 milliseconds, but each time Tick is called we want to set the timer to 1 second to make the timer continue so therefor it should look like this: more...
window.setTimeout("Tick()", 1000); function Tick() { }
So this will call the function called Tick after 1000 milliseconds, but each time Tick is called we want to set the timer to 1 second to make the timer continue so therefor it should look like this: more...
0 comments:
Post a Comment