Search results
The window object represents an open window in a browser. If a document contain frames (<iframe> tags), the browser creates one window object for the HTML document, and one additional window object for each frame.
14 lis 2024 · The Window interface represents a window containing a DOM document; the document property points to the DOM document loaded in that window. A window for a given document can be obtained using the document.defaultView property.
A windows does not need to have a name. Syntax. Return the name property: window.name. Set the name property: window.name = winName. Property Value. Return Value. More Examples. Open a frame with a special name: const otherWindow = window.open(); otherWindow.name = "Butterfly"; Try it Yourself » Browser Support.
The window object is supported by all browsers. It represents the browser's window. All global JavaScript objects, functions, and variables automatically become members of the window object. Global variables are properties of the window object. Global functions are methods of the window object.
31 lip 2024 · The Window object in JavaScript represents the browser window or frame. It offers properties like innerHeight, innerWidth, and screen, as well as methods like alert(), confirm(), and open(), enabling interaction and control over the window and document.
17 lis 2014 · Since window.open() returns a reference to the created window, you could store them in a variable, and close them on logout:
25 wrz 2024 · Window: window property. The window property of a Window object points to the window object itself. Thus, the following expressions all return the same window object: js. window.window; window.window.window; window.window.window.window; // …. In web pages, the window object is also a global object. This means: