JS window.open () Use method and compatibility note (1/3)

Source: Internet
Author: User

This article focuses on the use of window.open () to open a new window and some of the properties of the parameters in different browsers compatibility, OK, look at the code below.

<script type= "text/web Effects" >
<!--
window.open (' test.html ', ' newwindow ', ' height=100, width=400, Top=0, left=0, Toolbar=no, Menubar=no, Scrollbars=no, Resizable=no,location=no, Status=no ')
Must be written in one line
-->
</script>

Alwayslowered
Internet Explorer: not supported
Navigator: Version 4+
Specifies that the window always remains at the bottom of the stack. In other words, no matter whether the new window is active or not, it is always under another window.
window.open ("alwayslowered.html", "_blank", "alwayslowered");

--------------------------------------------------------------------------------

Alwaysraised
Internet Explorer: not supported
Navigator: Version 4+
Specifies that the window always remains on top of the stack. In other words, no matter whether the new window is active or not, it is always on another window.
window.open ("alwaysraised.html", "_blank", "alwaysraised");

--------------------------------------------------------------------------------

Channelmode
Internet Explorer: Version 4+
Navigator: Not supported
Specifies whether the window is displayed in theatre mode and whether the channel area is displayed.
window.open ("channelmode.html", "_blank", "channelmode");

--------------------------------------------------------------------------------

Dependent
Internet Explorer: not supported
Navigator: Version 4+
Defines whether the window becomes the dependent child window of the currently open window. A dependent window is closed when its parent window is closed. On the Windows platform, a dependent window is not displayed on the taskbar.
window.open ("dependent.html", "_blank", "dependent");

--------------------------------------------------------------------------------

Directories
Internet Explorer: all versions
Navigator: all Versions
Specifies whether to display the table of contents buttons (such as the well-known "what" and "What ' new" buttons). Internet Explorer refers to these directory buttons as link toolbars, and navigator (version 4 and above) is called a personal toolbar.
window.open ("directories.html", "_blank", "directories");

--------------------------------------------------------------------------------

Fullscreen
Internet Explorer: Version 4+
Navigator: Not supported
Defines whether to open the browser in Full-screen mode. Be careful with Full-screen mode, because in this mode, the browser's title bar and menu are hidden, all you should provide a button or other visual clues to help users close the window. Of course, using a hotkey Alt+f4 also closes the window.
window.open ("fullscreen.html", "_blank", "fullscreen");

--------------------------------------------------------------------------------

Height
Internet Explorer: all versions
Navigator: all Versions
Defines the height of the window document display area in pixel pixel, with a minimum value of 100. If you simply define a height, Internet Explorer uses the given height and the default width. For navigator, this property is ignored if width or innerwidth is not specified at the same time.
window.open ("height.html", "_blank", "height=200,width=300");

Home 1 2 3 last

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.