Window open() Method
This functionality proves advantageous in scenarios where the display of popup advertisements or instructional materials is required without interrupting the current window. For the purpose of unveiling a new browser window, one should employ the window.open() method.Syntax
In the aforementioned code snippet, the resulting value, which is stored within the variable newWindow, represents the reference to the newly created window. This reference can be utilized subsequently, such as for closing the window (newWindow.close()), bringing focus to the window (newWindow.focus()), or executing additional window manipulations.
The important Parameter of window.open() method are url, name, left, top, height and width. The other parameters are toolbar, menubar, scrollbars and resizable.
During the early stages of the web, Popup windows were excessively utilized and subjected to exploitation by numerous websites. Consequently, subsequent versions of web browsers incorporated measures to block such popup windows. Over time, the prevalence of popup windows has diminished significantly. Presently, automatically triggering popup windows is widely regarded as a highly unfavorable practice in the web development community.