For details about how to use showModalDialog in JS, refer to the basic introduction:
The window. showModalDialog () method is used to create a modal dialog box that displays HTML content. (The parent window cannot be operated after the window is opened. The operation can only be performed when the mode window is closed)
The window. showModelessDialog () method is used to create a non-modal dialog box that displays HTML content. (That is, other operations can still be performed after opening)
Usage:
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.
-------------------------------
Parameter transfer:
1. vArguments is used to pass Parameters in the dialog box. The type is not limited. For string types, the maximum value is 4096 characters. Objects can also be passed.
Parent.html
The Code is as follows:
User name: