JavaScript new window and child window pass value details

  • 2020-03-30 01:40:23
  • OfStack () support environment: JavaScript1.0+/JScript1.0+/Nav2+/IE3+/Opera3+
Window. The open (pageURL, name, the parameters)
PageURL is the path of the child window
Name the name of the pop-up window
Parameters are window parameters (separated by commas)
AlwaysLowered | yes/no | specifies that the window is hidden behind all Windows
AlwaysRaised | yes/no | specifies that the window is suspended over all Windows
Whether depended | yes/no | and parent window closed at the same time
Directories | yes/no | Nav2 and 3
Pixel value | window height
Hotkeys | yes/no | set a safe exit hotkey in a window without a menu bar
The pixel height of the document in the innerHeight | pixel value | window
The pixel width of a document in the innerWidth | pixel value | window
Is the location | yes/no | location column visible
Menubar | yes/no | menubar is visible
OuterHeight | pixel value | sets the pixel height of the window (including the decorative border)
OuterWidth | pixel value | sets the pixel width of the window (including the decorative border)
Resizable | yes/no | window size is adjustable
The pixel length of the screenX | pixel value | window from the left edge of the screen
The pixel length of the screenY | pixel value | window from the border on the screen
Scrollbars | yes/no | window can have a scrollbar
Titlebar | yes/no | window titlebar is visible
Toolbar | yes/no | window toolbar is visible
Width | pixel value | window pixel Width
Z-look | yes/no | window is floating on top of other Windows after being activated
<pre code_snippet_id="182098" snippet_file_name="blog_20140210_1_6035784" name="code" class="javascript"><SCRIPT>'page.html','newwindow','height=100,width=400,top=0,left=0,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no, status=no') 
</SCRIPT> </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"> two .</span></span></span><span style="font-family:'Hiragino Sans GB W3','Hiragino Sans GB',Arial,Helvetica,simsun,u5b8bu4f53; font-size:16px; text-indent:32px; color:rgb(76,76,76); line-height:28px">showModalDialog</span></h2> 

VReturnValue = window.showModalDialog(sURL [, vArguments] [,sFeatures])
VReturnValue = window. ShowModelessDialog (sURL vArguments [,] [sFeatures])
SURL required parameter, type: string. Specifies the URL of the document to be displayed in the dialog box.
VArguments optional, type: variant. Used to pass parameters to the dialog box. There is no limit to the types of arguments you can pass, including arrays, etc. Dialog through
SFeatures optional parameter, type: string. To describe the appearance of the dialog box, you can use one or more of the following, using the semicolon ";" Separated.
Window. dialogArguments to get the arguments passed in.

DialogHeight: dialogHeight, not less than 100px, the default unit of dialogHeight and dialogWidth in IE4 is em, and in IE5 is px, in order to facilitate the definition of modal mode dialog, use px as the unit.
2. DialogWidth:
DialogLeft: the distance to the left of the screen.
DialogTop: the distance from the screen.
5. Center: {yes | no | 1 | 0} : if the window is centered, the default is 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+] : can the size be changed? No by default.
8. Status: {yes | no | 1 | 0} [IE5+] : whether to display status bar. The default is yes[Modeless] or no[Modal].
9. Scroll :{yes | no | 1 | 0 | on | off} : The default is yes.
The following properties are used in HTA and are not used in normal web pages.
DialogHide :{yes | no | 1 | 0 | on | off} : whether the dialog box is hidden when printing or printing preview. The default is no.
11. Edge: {sunken | raised} : specify the border style of the dialog box. The default is raised.
12. Unadorned: {yes | no | 1 | | 0 on | off} : the default value is no.

/ / parent. HTM
<pre code_snippet_id="182098" snippet_file_name="blog_20140210_2_3894881" name="code" class="javascript"><script> 
var obj = new Object();"51js"; 
var obj = window.dialogArguments 
alert(" The parameters you passed are: " + 
//2. Information can be returned to the window that opens the dialog box through window.returnvalue, or it can be an object. For example: <Br>
<p></p><pre code_snippet_id="182098" snippet_file_name="blog_20140210_3_4734696" name="code" class="javascript">//parent.htm 
str =window.showModalDialog("modal.htm",,"dialogWidth=200px;dialogHeight=100px"); 
<p>1. Jump directly from the original form <br> 
window.location.href=" The page you want to jump to ";<br> 
2 To open a page in a new form <br>' The page you want to jump to ');</p> 
<p><span style="color:#ff0000">window.history.back(-1); Go back to the previous page  </span></p> 
<p><span style="color:#ff0000"><br> 
<p><span style="color:#ff0000"><br> 

Related articles: