JavaScript Tutorial

JS HomeJS EditorsJS How toJS Basic ProgramJS ConsoleJS VariableJS constJS Data TypesJS StringJS Type CastingJS KeywordsJS OperatorsJS Use StrictJS Escape SequencesJS Comments

JS Control Statements

JS ifJS if elseJS else ifJS BreakJS ContinueJS Switch Case

JS Looping

JS Loop ForJS Loop For InJS Loop WhileJS Loop Do While

JS Array

JS ArrayJS Array One DimensionalJS Array Multi DimensionalJS Array Associative

JS Functions

JS FunctionJS Function SelfJS Function call()JS Function apply()JS Call By ValueJS Call By ReferenceJS Function Closures

JS Scope

JS Scope GlobalJS Scope LocalJS Let

JS File Handling

JS File Handling

JS Error Handling

JS try catchJS throwJS finally

JS Select Particulars

JS getElementByID()JS getElementsByClassName()JS getElementsByTagName()JS getElementsByName()JS querySelector()JS querySelectorAll()

JS Popup

JS alert()JS confirm()JS prompt()

JS Events

JS EventsJS Media EventsJS Mouse EventsJS Keyboard EventsJS Form EventsJS Drag EventsJS Clipboard EventsJS Print EventsJS Animation EventsJS Transition EventsJS Server-Sent EventsJS Touch EventsJS Object Events

JS Methods

JS Array MethodsJS String MethodsJS Math MethodsJS Number MethodsJS Date MethodsJS Element MethodsJS Window MethodsJS Node MethodsJS Document MethodsJS Console MethodsJS Timing MethodsJS Navigator MethodsJS Miscellaneous Methods

JS Properties

JS Array PropertiesJS String PropertiesJS Number PropertiesJS MouseEvent PropertiesJS KeyboardEvent PropertiesJS AnimationEvent PropertiesJS TransitionEvent PropertiesJS Element PropertiesJS Window PropertiesJS Node PropertiesJS Document PropertiesJS Navigator PropertiesJS HashChangeEvent PropertiesJS Miscellaneous Properties

JS Regular Expressions

JS Regexp

JS Cookies

JS Cookies

JS Interview Programs

JS Common ProgramsJS Array ProgramsJS Converter ProgramsJS Star Patterns ProgramJS Number Patterns ProgramJS Alphabet Patterns Program

JS Reference

LEARN JSONLEARN AJAXJS KeycodeMIME TypesASCII Table

JavaScript Window Properties

Last Updated:

JavaScript Window Properties

The following are the list of Window properties available in JavaScript programming.

FunctionsExplanation
closed Indicates whether the referenced window is closed or not.
document Returns a reference to the document contained in the window.
frameElement Returns the frame (<iframe>, <object>, and <embed>) element in which the current window is inserted.
fullScreen Indicates whether the window is displayed in full screen mode or not.
innerHeight Returns the height (in pixels) of the browser window viewport including, the horizontal scrollbar, if rendered.
innerWidth Returns the width (in pixels) of the browser window viewport including, the vertical scrollbar, if rendered.
length eturns the number of frames (<iframe>, <embed>, and <object>) in the window.
localStorage Allows you to access and save data (key/value pairs) in a web browser.
location.href Returns the whole URL of the current page.
location.hostname Returns the domain name of the web host.
location.pathname Returns the path of the current page.
location.protocol Returns the web protocol used by the current page (http: or https:).
location.port Returns a string containing the port number of the current page.
opener Returns a reference to the window that opened the window using window.open().
outerHeight Returns the outer height (in pixel) of the browser window, including sidebar, window chrome, and window-resizing borders/handles.
outerWidth Returns the outer width (in pixel) of the browser window, including sidebar, window chrome, and window-resizing borders/handles.
pageXOffset Returns the number of pixels that the document is currently scrolled horizontally.
pageYOffset Returns the number of pixels that the document is currently scrolled vertically.
parent Returns a reference to the parent of the current window or subframe.
screen.width Returns the width of the screen, in pixels.
screen.height Returns the height of the screen, in pixels.
screen.availWidth Returns the amount of horizontal space (in pixels) available to the window.
screen.availHeight Returns the amount of vertical space (in pixels) available to the window.
screen.colorDepth Returns the color depth of the screen.
screen.pixelDepth Returns the bit depth of the screen.
scrollX Returns the number of pixels that the document is currently scrolled horizontally.
scrollY Returns the number of pixels that the document is currently scrolled vertically.
self Returns the current window.
sessionStorage Allows you to access and save data (key/value pairs) in a web browser.
top Returns a reference to the topmost window in the window hierarchy.

Share this Page

Meet the Author