What is the relationship between window and window in JavaScript?
Https://zhidao.baidu.com/question/1896482748628552420.html
The Window object in the Avascript represents the windows that are open in the browser.
If the document contains a frame (frame or iframe label), the browser creates a Window object for the HTML document and creates an additional window object for each frame.
Note: There is no public standard applied to the Window object, but this object is supported by all browsers.
The actual window is a Windows, such as Windows window operation is a windowed.
It does not matter
The BOM is the browser window object model, the top object is window
Window,document are an instance object, they are all objects, you cannot be in new and must call his methods and properties directly
There are seven properties for the Window object:
Defaulestatus: Specifies the information in the window status bar.
Status: Specifies the information in the current window's status bar.
Frames: is an array in which the contents are all frames in the window.
Parent: Refers to the parents window of the current window.
Self: Refers to the current window.
Top: Represents the topmost window of all current Windows.
Windows: Represents the current window.
There are five methods of the Window object:
Alert: Displays a dialog box with a OK button.
Confirm: Displays a dialog box with "OK" and "Cancel" two buttons.
Prompt: Displays a dialog box with an input area.
Open: Opens a new window.
Close: Closes the window that the user opened.
The window and document are not normally used.
But it's not that window will always have only one instance of window, and document will always have only one instance of document. For example, you can access the window and document in <iframe>. Again, for example, XMLHttpRequest's Responsexml property returns an instance of document.
JavaScript Window object