I. WINDOW.Open () support environment: javascript1.0 / jscript1.0 / nav2 / ie3 / Opera3
Second, the basic syntax:
Window.open (PageURL, Name, Parameters)
among them:
PageURL is a child window path
Name is a sub-window handle
Parameters is a window parameter (separated by comma)
Third, 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 line
->
Script>
After the script is running, page.html will open in the new form newwindow, a width of 100, high is 400, a distance of the screen 0 pixels, the left 0 pixels, no toolbar, no menu, no scroll bar, no Adjust the size, no address bar, and no status bar.
Check the control.
There are several other parameters that are commonly used in the above example, and there are many other parameters, please see IV.
Fourth, various parameters
Among them, YES / NO can also use 1/0; Pixel Value is a specific value, unit pixel.
Parameter | Value range | Description
| | |
Alwayslowered | YES / NO | Specify window hidden after all windows
Alwaysraised | YES / NO | Specify window hover above all windows
Depended | YES / NO | Whether and the parent window close
Directories | Yes / NO | NAV2 and 3 Directory Columns visible
Height | Pixel Value | Window Height
HotKeys | YES / NO | Set safe exit hot keys in the window without a 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 | Are the menu bar visible
OuterHeight | Pixel Value | Settings the pixel height of the window (including the decorative border)
OuterWidth | Pixel Value | Settings 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 from the Window Screen
Screeny | Pixel Value | Window Pixel Length
Scrollbars | YES / NO | Whether the window can have scroll bar
Titlebar | YES / NO | Whether the window topic bar is visible
Toolbar | YES / NO | Whether the window toolbar is visible
Width | Pixel Value | Pixel Width of Window
Z-Look | YES / NO | Whether the window is activated above other windows
Window.ShowModalDialog User Manual
basic introduction:
ShowModalDialog () (IE 4 Support)
ShowModelessDialog () (IE 5 support)
WINDOW.SHOWMODALDIALOG () method is used to create a modal dialog that displays HTML content.
WINDOW.SHOWMODELESSDIALOG () method is used to create a non-modular dialog that displays HTML content.
How to use: vreturnValue = WINDOW.SHOWMODALDIALOG (SURL [, Varguments] [, SFEATURES])
VreturnValue = WINDOW.SHOWMODELESSDIALOG (SURL [, Varguments] [, SFEATURES])
Parameter Description:
SURL -
Required parameters, type: string. The URL of the document to specify the dialog to display.
Varguments -
Optional parameters, type: variants. Used to deliver parameters to the dialog. Parameters passing are not limited, including arrays, and more. The dialog box has obtained the passing parameters via Window.Dialogarguments.
SFEATURES -
Optional parameters, type: string. The information used to describe the appearance of the dialog box can use one or several of the following, separated by a semicolon ";".
1.Dialogheight: dialogHEIGHT: Dialog Height, not less than 100px, IE4 DialogHeight and DialogWidth default unit is EM, and IE5 is PX, which is convenient to see, when defining the MODAL mode dialog, use PX to do units.
2. DialogWidth: dialog box width.
3. Dialogleft: The distance from the left screen.
4. Dialogtop: The distance from the screen.
5.Center: {YES | NO | 1 | 0}: Whether the window is in, default Yes, but still specify the height and width.
6.help: {yes | no | 1 | 0}: Whether to display the Help button, default YES.
7.Resizable: {YES | NO | 1 | 0} [IE5 ]: Whether it can be changed. Default NO.
8.Status: {yes | no | 1 | 0} [IE5 ]: Whether the status bar is displayed. The default is YES [Modeless] or no [modal].
9. Scroll: {yes | no | 1 | 0 | ON | OFF}: Indicates if the dialog box displays the scroll bar. Default is YES.
The following attributes are used in HTA, which is generally not used in a general web page.
10.DialoGHide: {yes | no | 1 | 0 | ON | OFF}: Hide in the dialog box when printing or printing preview. The default is NO.
11.EDGE: {Sunken | Raised}: Indicates the border style of the dialog. Default is raised.
12.unadorned: {yes | No | 1 | 0 | ON | OFF}: The default is NO.
Parameter passing:
1. To pass the parameters, it is passed through Varguments. Types are not limited, for string type, up to 4096 characters. You can also transfer objects, for example:
-------------------------------
Parent.htm
Var obj = new object ();
Obj.name = "51JS";
Window.ShowModalDialog ("MODAL.HTM", OBJ, "Dialogwidth = 200px; Dialogheight = 100px");
script>
MODAL.htm