Parameters of window. open in js and Points for Attention
- 2021-07-01 06:37:48
- OfStack
When using window. open under IE9, it should be noted that the parameter value of name cannot appear "-", otherwise script errors will occur, and there is no problem in IE9 and version test
window.open(URL,name,specs,replace)
Parameter
Description
URL
Optional. Opens the URL of the specified page. If URL is not specified, open a blank window with a new one
name
Optional. Specifies the name of the target property or window. The following values are supported:
_ blank-URL loads into 1 new window. This is the default
_ parent-URL Load to Parent Frame
_ self-URL Replaces current page
_ top-URL replaces any loadable frameset
name-Window name
specs
Optional. 1 comma-separated list of items. The following values are supported:
channelmode=yes|no|1|0
Whether to display window in cinema mode. There is no default. IE browser only
directories=yes|no|1|0
Whether to add a directory button. The default is affirmative. IE browser only
fullscreen=yes|no|1|0
Whether the browser displays full screen mode. There is no default. window in full screen mode must also be in cinema mode. IE browser only
height=pixels
The height of the window. Minimum. Value is 100
left=pixels
The left position of the window
location=yes|no|1|0
Whether to display the address field. The default value is yes
menubar=yes|no|1|0
Whether to display the menu bar. The default value is yes
resizable=yes|no|1|0
Whether the window can be resized. The default value is yes
scrollbars=yes|no|1|0
Whether to display the scroll bar. The default value is yes
status=yes|no|1|0
Do you want to add 1 status bar? The default value is yes
titlebar=yes|no|1|0
Whether to display the title bar. Ignored unless calling an HTML application or a trusted dialog box. Default is yes
toolbar=yes|no|1|0
Whether to display the browser toolbar. The default value is yes
top=pixels
The position of the top of the window. IE browser only
width=pixels
Width of the window. Minimum. Value is 100
replace
Optional. Specifies specifies whether the URL loaded into the window creates a new entry in the window's browsing history or replaces the current entry in the browsing history. The following values are supported:
true-URL replaces the current entry in the browsing history.
false-URL Creates new entries in the browsing history.