It will often be times where we want a piece of Java Script code to run after a set amount of time has passed. You may even want the code to run over and over at set intervals.
It is very Easy to Time Event in Java Script.
There are two key methods in Java Script.
1 setTimeout()
2 clearTimeout()
1 setTimeout()
The setTimeout() event handler will run Javascript code that you want to run after a specified amount of time has passed.It is depends upon the programmer how they use this
event or how they set the time.
Syntax
var the_timeout = setTimeout("some javascript statement",
time milliseconds);