JavaScript window.open() Open a new window and set properties
window.open is the JavaScript standard syntax for opening new windows. Sometimes applications on web pages need to open a new window to display additional web page information. Through the window.open method, we can specify the opening of a new window Various specifications, such as width, height, whether to display the browser toolbar, whether to display the scrollbar... etc. In this introduction, we will introduce how to use JavaScript's window.open() to open a new window. The new window can display different HTML or PHP web pages.
JavaScript window.open open new window syntax
window.open config common parameter list
| parameter | Parameter value and description |
| toolbar | Specify whether to display the toolbar, the default is to display, if you want to set it to not display, the wording is toolbar=no. |
| scrollbars | Specify whether to display scroll bars. To display the wording is scrollbars=yes, and not to display the wording is scrollbars=no. |
| resizable | Whether visitors can adjust the window size by themselves, the default is yes, if you want to set it to not be adjustable, the wording is resizable=no. |
| location | Whether to display the address bar, the default is to display, if not to display, the wording is location=no. |
| menubar | Whether to display the directory column, it will be displayed by default. If not, the wording is menubar=no. |
| status | Whether to display the status bar, the default is to display, if not to display, the wording is status=no. |
| left | The distance from the left, in pixels. |
| top | The distance from the top, the unit is pixels. |
JavaScript window.open example
[2014.10.3] Errata modification, the scrollbars part of the config parameter table has been modified correctly, thanks to the netizen Milk for providing the correct information.
Post a Comment
0 Comments