The parameters of window.open in JS and precautions to pay attention to the basics

Source: Internet
Author: User

IE9 use window.open When you need to note that the name parameter value cannot have "-" to appear, otherwise there will be script errors, IE9 and version test is not a problem

window.open (Url,name,specs,replace)

Parameters Description
Url Optional. Opens the URL of the specified page. If no URL is specified, open a new blank window
Name Optional. Specifies the name of the target property or window. The following values are supported:
  • _blank-url is loaded into a new window. This is the default
  • _parent-url Load to Parent frame
  • _self-url Replace the current page
  • _top-url to replace any loadable frameset
  • name-window names
Specs Optional. A comma-delimited list of items. The following values are supported:

Channelmode=yes|no|1|0 Whether to display window in movie mode. The default is not. IE Browser only
Directories=yes|no|1|0 Whether to add a table of contents button. The default is yes. IE Browser only
Fullscreen=yes|no|1|0 Whether the browser displays Full-screen mode. The default is not. In Full-screen mode, Windows must also be in the theater 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 is Yes
Resizable=yes|no|1|0 Whether the window can be resized. The default value is Yes
Scrollbars=yes|no|1|0 Whether scroll bars are displayed. The default value is Yes
Status=yes|no|1|0 Whether you want to add a status bar. The default value is Yes
Titlebar=yes|no|1|0 Whether to display the title bar. Ignored unless you call an HTML application or a trusted dialog box. The default is Yes
Toolbar=yes|no|1|0 Whether or not 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 The width of the window. Minimum. Value is 100
Replace Optional.specifies Specify whether the URL loaded to 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 a new entry in the browsing history.

The above JS window.open parameters and attention is small series to share all the content, I hope to give you a reference, but also hope that we support the cloud-dwelling community.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.