Home > Article > Web Front-end > Detailed explanation of JavaScript new window and sub-window value transfer_javascript skills
window.open() support environment: JavaScript1.0 /JScript1.0 /Nav2 /IE3 /Opera3
window.open(pageURL,name,parameters)
pageURL is the sub-window path
name the name of the pop-up window
parameters are window parameters (each parameter is separated by a comma)
alwaysLowered | yes/no | The specified window is hidden behind all windows
alwaysRaised | yes/no | The specified 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 | whether A safe exit hotkey is set in the window of the menu bar
innerHeight | pixel value | The pixel height of the document in the window
innerWidth | pixel value | The 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 decorative borders)
outerWidth | pixel value | Set the pixel height of the window (including decorative borders) Pixel width
resizable | yes/no | Whether the window size is resizable
screenX | pixel value | The pixel length of the window from the left edge of the screen
screenY | pixel value | The pixel length of the window from the upper edge of the screen
scrollbars | yes/no | Whether the window can have a scroll bar
titlebar | yes/no | Whether the window title bar is visible
toolbar | yes/no | Whether the window toolbar is visible
Width | pixel value | Window Pixel width
z-look | yes/no | Whether the window floats above other windows after it is activated
<SCRIPT> <br>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' ) <br></SCRIPT>
<script> <br>var obj = new Object(); <br>obj .name="51js"; <br>window.showModalDialog("modal.htm",obj,"dialogWidth=200px;dialogHeight=100px"); <br></script> <br>//modal.htm <br><script> <br>var obj = window.dialogArguments <br>alert("The parameter you passed is: " obj.name) <br></script>
< ;/p>
//-------------------------- ------------------
///2. You can use window.returnValue to return information to the window where the dialog box is opened. Of course, it can also be an object. For example:
//-----------------------------
//parent.htm <br><script> <br>str = window.showModalDialog("modal.htm",,"dialogWidth=200px;dialogHeight=100px"); <br>alert(str); <br></script> <br>//modal.htm <br>< ;script> <br>window.returnValue="http://www.bokee.com"; <br></script>
1. To jump directly in the original form, use
window.location.href="The page you want to jump to";< ;br>
2. To open a page in a new form:
window.open('The page you want to jump to');
window.history.back(-1);Return to the previous page
>