Navigator 2.0, Internet Explorer 3.0
window.setTimeout(code, delay)
A string that contains the JavaScript code to be executed after the delay has elapsed.
The amount of time, in milliseconds, before the JavaScript statements in the string code should be executed.
An opaque value (a "timeout id") that can be passed to the clearTimeout() method to cancel the execution of code.
The setTimeout() method defers the execution of the JavaScript statements in the string code for delay milliseconds. Once the specified number of milliseconds have elapsed, the statements in code are executed normally. Note that they are executed only once. To execute code repeatedly, code must itself contain a call to setTimeout() to register itself to be executed again.
The statement in the string code are executed in the context of window--i.e., window will be the current window for those statements. If more than one statement appears in code, the statements must be separated from each other with semicolons.
In Navigator 2.0 memory allocated by JavaScript is not freed until the browser leaves a web page. Each call to setTimeout() consumes some memory, and the deferred code generally consumes memory as well. Thus, if a page performs some sort of infinite loop (for example, a status-bar animation using Window.setTimeout() and Window.status), then memory will slowly be consumed, and Navigator may crash if the user remains on the page for a long time.
file: /Techref/language/java/script/definitive/refp_460.htm, 6KB, , updated: 2019/10/14 15:00, local time: 2024/12/23 02:32,
18.116.27.225:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://massmind.org/techref/language/java/script/definitive/refp_460.htm"> [Chapter 21] Reference: Window.setTimeout()</A> |
Did you find what you needed? |
Welcome to massmind.org! |
Welcome to massmind.org! |
.