August 1999
Intermediate to advanced
1488 pages
72h 53m
English
window.clearInterval(interval)
The clearInterval() method of the Window object clears the interval that is passed to the method. The interval that is passed has to be previously defined using the setInterval() method.
Listing 7.529 sets an interval in the <head> of the document that displays a counter in a text box on the page. An interval is set to update the counter in the text box every five seconds. There is also a button on the page that can be clicked to clear the interval and stop the counting.
<html> <head> <title>Using window.clearInterval()</title> <script language="JavaScript1.2"> ... |
Read now
Unlock full access