Window. Open Parameters

Source: Internet
Author: User

I,Window. Open() Supported environments: javascript1.0 +/jscript1.0 +/nav2 +/ie3 +/opera3 +

Ii. Basic Syntax:
Window. Open(Pageurl, name, parameters)
Pageurl is the sub-window path
Name is the sub-window handle
Parameters is window parameters (parameters are separated by commas)

Iii. Example:
<! --
Window. Open('Page.html ', 'newwindow', 'height = 100, width = 400, Top = 0, Left = 0, toolbar = No, menubar = No, scrollbars = No, resizable = No, location = No, status = no ')
// Write a row
After running the script, page.html will be opened in the newwindow of the new form, with a width of 100, a height of 400, 0 pixels at the top of the screen, 0 pixels at the left of the screen, and no toolbar,No menuBar, no scroll bar, no size adjustment, no address bar, no status bar.
Please compare.

In the preceding example, several common parameters are involved. In addition, there are many other parameters. For details, see section 4.

Iv. Parameters
Here, yes/no can also use 1/0; pixel value is a specific value, in pixels.

Parameter | value range | description
Alwayslowered | yes/no | specifies that the window is hidden behind all windows
Alwaysraised | yes/no | specify that the window is suspended above all windows
Depended | yes/no | whether to close the parent window at the same time
Directories | yes/no | whether the directory bar of nav2 and 3 is visible
Height | pixel value | window height
Hotkeys | yes/no | set the Security Exit hotkey in the window without menu bar
Innerheight | pixel value | pixel height of the document in the window
Innerwidth | pixel value | pixel width of the document in the window
Location | yes/no | whether the location bar is visible
Menubar | yes/no | whether the menu bar is visible
Outerheight | pixel value | set the pixel height of the window (including the decorative border)
Outerwidth | pixel value | set the pixel width of the window (including the decorative border)
Resizable | yes/no | whether the window size can be adjusted
Screenx | pixel value | pixel length between the window and the left boundary of the screen
Screeny | pixel value | pixel length between the window and the upper boundary of the screen
Scrollbars | yes/no | whether the window has a scroll bar
Titlebar | yes/no | whether the title bar of the window is visible
Toolbar | yes/no | whether the toolbar of the window is visible
Width | pixel value | pixel width of the window
Z-Look | yes/no | whether the window floated above other windows after being activated
Fullscreen | 1/2/3 | full screen window: 1 by default

Window. showmodaldialog User Manual

Basic Introduction:
Showmodaldialog () (ie 4 + supported)
Showmodelessdialog () (ie 5 + supported)
The window. showmodaldialog () method is used to create a modal dialog box that displays HTML content.
The window. showmodelessdialog () method is used to create a non-modal dialog box that displays HTML content.

Vreturnvalue = Window. showmodaldialog (Surl [, varguments] [, sfeatures])
Vreturnvalue = Window. showmodelessdialog (Surl [, varguments] [, sfeatures])

parameter description:
Surl --
required parameter. Type: string. Specifies the URL of the document to be displayed in the dialog box.
varguments --
optional parameter; Type: variant. Used to pass parameters to the dialog box. The passed parameter types are not limited, including arrays. The dialog box uses window. dialogarguments to obtain the passed parameters.
sfeatures --
optional parameter; Type: string. Used to describe the appearance and other information of the dialog box. You can use one or more of the following, separated by semicolons.
1. dialogheight: the dialog box height. The default unit of dialogheight and dialogwidth in ie4 is em, while that in ie5 is PX. For convenience, when defining the modal mode dialog box, unit with PX.
2. dialogwidth: Dialog Box width.
3. dialogleft: the distance from the left of the screen.
4. dialogtop: distance from the screen.
5. Center: {Yes | no | 1 | 0}: whether the window is centered. The default value is yes, but the height and width can still be specified.
6. Help: {Yes | no | 1 | 0}: whether to display the Help button. The default value is yes.
7. resizable: {Yes | no | 1 | 0} [ie5 +]: whether the size can be changed. No by default.
8. Status: {Yes | no | 1 | 0} [ie5 +]: whether to display the status bar. The default value is Yes [modeless] or no [modal].
9. Scroll: {Yes | no | 1 | 0 | on | off}: indicates whether the scroll bar is displayed in the dialog box. The default value is yes.
the following attributes are used in HTA and are not used in general webpages.
10. dialoghide: {Yes | no | 1 | 0 | on | off}: whether the dialog box is hidden when printing or previewing. The default value is no.
11. Edge: {sunken | raised}: Specify the border style of the dialog box. The default value is raised.
12. unadorned: {Yes | no | 1 | 0 | on | off}: No by default.

parameter transfer:
1. To pass parameters in the dialog box, varguments is used. The type is not limited. For string types, the maximum value is 4096 characters. You can also pass objects, for example,


2. you can use window. returnvalue returns information to the window that opens the dialog box. It can be an object. Example:


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: 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.