Window.open () Support environment: JavaScript1.0+/JScript1.0+/NAV2+/IE3+/Opera3+
Window.open (Pageurl, name, parameters)
Pageurl is the path of the child window
name pop -up window name
Parameters is the window parameter (separated by comma in each parameter)
AlwaySLOWERED | yes/no | Specify the window hidden behind all windows
alwaysraise | yes/no | Specify window suspended on all windows
depended | yes/no | Is it closed at the same time as the father window
Directories | yes/no | nav2 and 3's directory column is visible
Height | Pixel Value | Window height
HotKeys | YES/No | Set a safe exit hot key in the window without a menu bar
InnerHeight | Pixel Value | Window's pixel height
InnerWidth | Pixel Value | Pixel width of the Chinese document in the window
Location | Yes/NO | Whether the location bar is visible
Menubar | yes/no | menu bar is visible
OUTERHEIGHT | Pixel Value | Setting window (including decorative border) pixel height
OUTERWIDTH | Pixel Value | Setting window (including decorative border) pixel width
Resizable | yes/no | Whether the size of the window can be adjusted
ScreenX | Pixel Value | Pixel length of the window from the left boundary of the screen
Screeny | Pixel Value | Pixel length of the border from the screen on the screen
Scrollbars | Yes/NO | Whether there is a rolling bar in the window
Titlebar | Yes/NO | Whether the window topic column is visible
Toolbar | Yes/NO | Whether the window toolbar is visible
Width | Pixel Value | Pixel width of the window
Z-LOOK | YES/No | Whether the window is activated or not on other windows
Copy code code as follows:
<pre code_snippet_id = "182098" snippet_file_name = "blog_20140210_1_6035784" name = "code"> <script>
Window.open ('Page.html', 'Newwindow', 'Height = 100, Width = 400, to P = 0, Left = 0, Toolbar = No, ScrolLLLS = no, Resizable = NO, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L Ocation = no , Status = no '))
</Script> </pre>
<pre> </pre>
<h2> <a name = "t3"> </a> <span style = "font-family: microsoft yahei; font-size: 14px"> <span style = "color: rgb (76,76,76); LINE-Height: 28px; Text-indent: 32px "> <span style =" color: rgb (76,76,76); line-height: 28px; text-indent: 32px "> 2. </span> </</</</</</span> </</ span> </span> <span style = "font-family: 'hiragino sans gb w3', 'hiragino sans gb', arial, simsun, u5b8bu4f53; font-size: 16px; Dent: 32px; color: RGB (76,76,76); line-height: 28px "> showmodaldialog </span> </h2>
<pre> </pre>
<pre> </pre>
vreturnValue = Window.showmodalDialog (Surl [, Varguments] [, Sfeatures]))
vreturnValue = Window.showmodelessDialog (Surl [, VARGUMENTS] [, Sfeatures])))
Surl must choose parameters, type: string. URL used to specify the document to be displayed in the dialog box.
Varguments optional parameters, type: variant. Used to pass parameters to the dialog box. The parameter type passed by is not limited, including array, etc. Dialog box passes
SFEATURES optional parameter, type: string. Used to describe the appearance and other information of the dialog box, you can use one or more below, and use the segment ";" to separate.
Window.DialogarGuments to obtain parameters passed in.
1. Dialogheight: The dialog box height, not less than 100px, Dialogheight and Dialogwidth in IE4 are EM, and IE5 is PX, which is convenient for the MODAL dialog box.
2. Dialogwidth: Dialog box width.
3.Dialogleft: 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 yes, but the height and width can still be specified.
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. The default NO.
8.status: {yes | no | 1 | 0} [IE5+]: Whether to display the status bar. The default is yes [modeless] or no [modal].
9.Scroll: {yes | no | 1 | 0 | 0 | OFF}: indicate whether the dialog box displays the rolling bar. The default is yes.
The following attributes are used in HTA and are generally not used in general web pages.
10. DialogHide: {yes | no | 1 | 0 | 0 | OFF}: Whether the dialog box is hidden during printing or printing preview. The default is NO.
11.edge: {Sunken | Raised}: Indicate the border style of the dialog box. The default is raise.
12.unadorned: {yes | no | 1 | 0 | 0 | OFF}: The default is NO.
//parent.htm
Copy code code as follows:
<pre code_snippet_id = "182098" snippet_file_name = "blog_20140210_2_3894881" name = "code"> <script>
var obj = new object ();
obj.name = "51js";
Window.showmodalDialog ("modal.htm", obj, "dialogwidth = 200px; dialogheight = 100px");
</script>
//modal.htm
<script>
var obj = window.dialogarguments
Alert ("The parameters you pass are:" + Obj.name)
</script> </pre> <p> </p>
<pre> </pre>
<p> </p>
<p>//-------------------------------<br>
// 2. You can return the information to the window that opens the dialog box via Window.returnValue. Of course, it can also be an object. For example: <br>
//------------------------------</p>
<p> </p> <pre code_snippet_id = "182098" snippet_file_name = "blog_20140210_3_4734696" name = "code"> // paint.htmm
<script>
Str = Window.showmodalDialog ("MODAL.HTM", "Dialogwidth = 200px; Dialogheight = 100px");
alert (str);
</script>
//modal.htm
<script>
Window.returnValue = "http://www.box";
</script> </pre> <br>
<br>
<p> </p>
<p> 1. Jump directly in the original window <br>
Window.location.href = "Page you want to jump"; <br>
2. Open the page in the new window for use: <br>
Window.open ('The page you want to jump'); </p>
<p> <span style = "color:#ff0000"> window.history.back (-1); return to the previous page </span> </p>
<p> <span style = "color:#ff0000"> <br>
</span> </p>
<p> <span style = "color:#ff0000"> <br>
</span> </p>