
Window
JavaScript Pocket Reference
|
127
interval ID value that can be passed to clearInterval() to
cancel the periodic executions. JS 1.2.
setTimeout(code, delay)
Evaluates the JavaScript code in the string code after delay
milliseconds have elapsed. In Netscape 4 and IE5, code may
be a function rather than a string; see the discussion under
setInterval(). Returns a timeout ID value that can be passed
to
clearTimeout() to cancel the pending execution of code.
Note that this method returns immediately; it does not wait
for
delay milliseconds before returning. JS 1.0.
Event Handlers
Event handlers for a Window object are defined by attributes of
the
<body> tag of the document.
onblur
Invoked when the window loses focus.
onerror
Invoked when a JavaScript error occurs. This is a special event
handler that is invoked with three arguments that specify the
error message, the URL of the document that contained the
error, and the line number of the error, if available.
onfocus
Invoked when the window gains focus.
onload
Invoked when the document (or frameset) is fully loaded.
onresize
Invoked when the window is resized.
onunload
Invoked when the browser leaves the current document.
See Also
Document