-
JavaScript Window localStorage property
The localStorage property in JavaScript provides access to the local storage area for the current web page. Local storage allows web pages to store data locally on the user’s device, and to access that data later, even if the user is offline. The localStorage property is part of the Web Storage API, and is supported…
-
JavaScript Window length property
The length property in JavaScript represents the number of frames (or iframes) in a window or frame. This property is read-only, and can be used to determine the number of frames in a window or frame. Here is an example of how to use the length property: In this example, the length property is used…
-
JavaScript Window innerWidth property
The innerWidth property in JavaScript represents the width of the browser window, in pixels. This value includes the width of the horizontal scrollbar, if one is present. The innerWidth property is read-only, and can be used to determine the width of the browser window in a responsive web design. Here is an example of how…
-
JavaScript Window innerHeight property
The innerHeight property in JavaScript is a property of the Window object that returns the height of the inner (visible) area of the browser window, in pixels. This property excludes the height of the browser’s toolbar, scrollbars, and any other elements outside the inner area of the window. Here is an example of how the…
-
JavaScript Window getComputedStyle() method
The getComputedStyle() method in JavaScript is a method of the Window object that returns the computed values of all the CSS properties of an element. This method takes an element as an argument, and returns a CSSStyleDeclaration object that contains the computed values of all the CSS properties of the element, including both inherited and…
-
JavaScript Window History property
The History property in JavaScript is a property of the Window object that provides methods and properties for accessing and manipulating the browser’s history. The History object allows you to navigate the user’s browsing history, and add, replace, or remove entries in the history. Here is an example of how the History property works: In…
-
JavaScript Window frames property
The frames property in JavaScript is a property of the Window object that refers to the collection of frame or iframe elements in the current window. The frames property is an array-like object that contains references to the individual frame or iframe elements in the current window, indexed by their frame or iframe names. Here…
-
JavaScript Window frameElement property
The frameElement property in JavaScript is a property of the Window object that refers to the frame or iframe element in which the current window is embedded. This property is null if the current window is not embedded in a frame or iframe element. Here is an example of how the frameElement property works: In…
-
JavaScript Window focus() method
The focus() method in JavaScript is used to give focus to a window or an element within a window. This method does not take any arguments, and simply focuses the window or element on which the focus() method is called. Here is an example of how the focus() method works: In the code example above,…
-
JavaScript Window Document property
The Document property in JavaScript is a property of the Window object that refers to the current document in the browser. The Document object represents the HTML document that is loaded in the browser, and provides methods and properties for accessing and manipulating the contents of the document. Here is an example of how the…