TOC PREV NEXT INDEX

domref



window.setInterval()


Set a delay for a specific function.

Syntax

ID = window.setInterval("funcName", delay)
 

Parameters

funcName is the name of the function for which you want to set a delay.

delay is the number of milliseconds (thousandths of a second) that the function should be delayed.

ID is the interval ID.


Example

intervalID = window.setInterval("animalate()", 500);
 

Notes

The interval ID is used to refer to the specific interval when it needs to be cleared. The setInterval() function is commonly used to set a delay for functions that are executed again and again, such as animations.

See also window.clearInterval().

Specification

DOM Level 0. Not part of specification.
 


Netscape Communications
http://developer.netscape.com
TOC PREV NEXT INDEX