w3resource logo


JavaScript Textarea Object - select Method

JavaScript : window objects

rating Average rating 6 out of 10. Total 4 users rated.

<<PreviousNext>>

Description

The window object, which is a top-level object in Client Side JavaScript, represents a window or a frame (within a frameset). Since window object is a top-level object, it contains other objects like 'document', 'history' etc. within it. For example, window.document.frames[i], where i is 1,2,3....., refers to the index of the frame residing in the current window.

For a top-level window, the parent and top properties refer to the window itself. For frame, the top refers to the topmost browser window, and parent refers to the parent window of the current window.

If a frame has name and src attribute you can refer to that frame from a sibling frame by using parent.frameName or parent.frames[i], where i is 1,2,3.......

A window object is opened with window.open() and closed with window.close(), if the window does not refer to a frame.

In the subsequent pages we have discussed window object in detail with lots of examples.

Javascript Window Objects Property

Name Description Version
closed Determine whether a window is closed or not. Implemented in JavaScript 1.1
defaultStatus Retrieves the default message displayed in the window’s status bar at the bottom. Implemented in JavaScript 1.0
document Contains information about the current document. Implemented in JavaScript 1.0
innerHeight Specifies the vertical dimension(height of the window), in pixels. Implemented in JavaScript 1.2
innerWidth Specifies the horizontal dimension(width of the document)), in pixels. Implemented in JavaScript 1.2
location Specify the information of the current URL. Implemented in JavaScript 1.0
locationbar Test whether the location bar is visible is or not. Implemented in JavaScript 1.2
menubar Refers the browser window's menu bar. Implemented in JavaScript 1.2
name Get the unique name of a specified window. Implemented in JavaScript 1.0
opener Specifies the window of the calling document. Implemented in JavaScript 1.1
outerHeight Specifies the vertical dimension, in pixels, of the window's outside boundary. Implemented in JavaScript 1.2
outerWidth Specifies the horizontal dimension of the window’s outside boundary. Implemented in JavaScript 1.2
pageXOffset Refers the current x-position of a page in a window. Implemented in JavaScript 1.2
pageYOffset Refers the current y-position of a page in a window. Implemented in JavaScript 1.2
personalbar Refers the browser window's personal bar. Implemented in JavaScript 1.2
screenX Specify the x coordinate of the left edge of the window. Implemented in JavaScript 1.2
screenY Refers the y-coordinate of the upper edge of a window. Implemented in JavaScript 1.2
scrollbars Refers the scroll bars of the browser window.. Implemented in JavaScript 1.2
status Specifies a string displayed in the browser status bar at the bottom of the window. Implemented in JavaScript 1.0
statusbar Refers the status bar of the browser window. Implemented in JavaScript 1.2
toolbar Refers the toolbar of the browser window. Implemented in JavaScript 1.2

Javascript Window Objects Methods

Name Description Version
alert Displays an Alert dialog box with a message and an OK button. Implemented in JavaScript 1.0
atob Decodes a string of encoding data using base-64 encoding. Implemented in JavaScript 1.2
back Takes the browser to the previous URL in the current history list. Implemented in JavaScript 1.2
blur Removes focus from a specific window or frame. Implemented in JavaScript 1.0
btoa Convert a given string to a encoded data (using base-64 encoding) string. Implemented in JavaScript 1.2
clearInterval Cancels a timeout that which was set with the setInterval method. Implemented in JavaScript 1.2
clearTimeout Cancels a timeout which was set with the setTimeout method. Implemented in JavaScript 1.0
close Closes the specified window. Implemented in JavaScript 1.0
confirm Displays a Confirm dialog box with the specified message and two buttons OK and Cancel. Implemented in JavaScript 1.0
find Search the specified text string in the contents of the specified window. Implemented in JavaScript 1.2
focus Gives focus to a specific window. Implemented in JavaScript 1.1
forward Takes the browser to the next URL in the current history list. Implemented in JavaScript 1.2
home Returns the browser to the user's specified home page. Implemented in JavaScript 1.2
moveBy Move the window relative to it's current position in pixels. Implemented in JavaScript 1.2
moveTo Move the top-left corner of the window to the given screen coordinates. Implemented in JavaScript 1.2
open Opens a new web browser window. Implemented in JavaScript 1.0
print Prints the contents of the window. Implemented in JavaScript 1.2
prompt Displays a Prompt dialog box including a message and an input field. Implemented in JavaScript 1.0
resizeBy Resizes an entire window by moving the window's bottom-right corner by the specified number of pixels. Implemented in JavaScript 1.2
resizeTo Resizes an entire window to the specified pixel dimensions. Implemented in JavaScript 1.2
scrollBy Scrolls the specified window by the number of pixels passed to the method. Implemented in JavaScript 1.2
scrollTo Scrolls the viewing area of the window so that the specified point becomes the top-left corner. Implemented in JavaScript 1.2
setInterval Either evaluates an expression or calls a function after every specified number of milliseconds. Implemented in JavaScript 1.2
setTimeout Evaluates an expression or calls a function after a specified number of milliseconds. Implemented in JavaScript 1.2
stop Halts the current download. Implemented in JavaScript 1.2

See also :

JavaScript Client side objects, methods, properties.

JavaScript Core objects, methods, properties.



<<PreviousNext>>