Window Object

Domain Hosting image
Web Hosting
Dedicated server
ssl certificate
Web Design image
Email
The window is the top level object of the hierarchy. It has properties that are used to identify the objects of the HTML elements. A unique window object is defined for each new window that is opened. As mentioned earlier window object is the detault object.

The window object has several synonyms that lets you refer to the current window object displayed in the browser as well as other related window objects. The following table illustrates the various properties supported by window object.

PropertyDescription
closed This property identifies whether a window is closed
defaultStatus This property is to declare the default status for browser window
document This object refers to the current document displayed in the window
frames This property is an array that contains all the frame objects in the window object
history This object contains a list of URLs last loaded into the window
length This property identifies the number of frames contained in a window
location This is an object that identifies the URL associated with a window object
name This property identifies the name of the window
opener This property identifies the window object that caused a window
parent This is a synonym that identifies the window containing a particular window
self This is a synonym that identifies the current window
status This property specifies a message that appears on the status bar
top This is a synonym that refers to the topmost window in a series of nested windows.
win dow This is a synonym that identifies the current window.


The following table shows a list of methods defined by the window object:

MethodDescription
alert() To display an alert dialog box
blur() To remove focus from a window
clearInterval (interval) To clear a previously set interval timer
clearTimeout(timer) To clear a previously set timeout
close() To close a specified window
confirm(text) To display a confirm dialog box
focus() To give focus to a window
open(url,name [options]) To open a new window
prompt(text, defaultinput) To display a prompt dialog box to get input from the user
scroll(x,y) To scroll a window to the specified location
setl nterval (expression or f unction, milliseconds, [arguments]) To repeatedly evaluate a function or expression after a specified time interval
setTimeout(expression or function,] milliseconds, [arguments]) To evaluate an expression after a time period has elapsed



Domain Name Search

www.


Copyright (C) 2007. Web Domain design hosting. All rights reserved.