HTML and CSS Reference
In-Depth Information
Table 10.4 Properties of the window Object (continued)
Property
What It Describes
opener
The window that opened the current window.
parent
Indicates a window that contains another window (used with
frames).
screen
Displays information about the screen, such as height, width (in
pixels).
self
Refers to the current window. For all windows, the self and window
properties of a window object are synonyms for the current
window, and you can optionally use them to refer to the current
window.
status
Specifies a temporary message in the status bar, resulting user
interaction.
top
The topmost window containing a particular window (used with
frames).
window
Identifies the current window being referenced, synonymous with
self.
The window object also has a number of methods that define its behavior, listed in
Table 10.5, such as how to open, close, scroll, and clear a window.
Table 10.5 Methods of the window Object
Method
What It Does
alert(text)
Creates a triangular dialog box with a message in it.
blur()
Removes focus from the window.
clearInterval(interval)
Clears a previously set interval timer.
clearTimeOut(timer)
Clears a previously set timeout.
close()
Closes a window.
confirm()
Creates a dialog box for user confirmation.
focus()
Gives the focus to a window.
open(url, name, [options])
Opens a new window and returns a new window
object.
prompt(text, defaultInput)
Creates a dialog prompt box to ask for user input.
 
Search WWH ::




Custom Search