August 1999
Intermediate to advanced
1488 pages
72h 53m
English
window.clearTimeout(timeout)
The clearTimeout() method of the Window object clears the timeout passed to the method. The timeout that is passed has to be previously defined using the setTimeout() method.
Listing 7.530 has a button and text box. By the default, the time will be displayed in the text box after five seconds. This is done using the setTimeout() method. If the button is clicked, a function is called that invokes the clearTimeout() method preventing the time from being displayed in the text box.
<html> <head> <script language="JavaScript"> <!-- Hide // Define a function to show the ... |
Read now
Unlock full access