Set a delay for a specific function.
ID = window.setInterval(funcName, delay)
funcNameis the name of the function for which you want to set a delay.
delayis the number of milliseconds (thousandths of a second) that the function should be delayed.
IDis the interval ID.
intervalID = window.setInterval("animalate()", 500);
The interval ID is used to refer to the specific interval when it needs to be cleared. The window.setInterval function is commonly used to set a delay for functions that are executed again and again, such as animations. See also window.clearInterval.
DOM Level 0. Not part of specification.