Basic introduction: The
window.showModalDialog() method is used to create a modal dialog box that displays HTML content. (That is, you cannot operate the parent window after it is opened, you can only operate it in the wait mode because you cannot operate the parent window after opening it. Thewindow.showModelessDialog() method is used to create a non-modal dialog box that displays HTML content. (You can still perform other operations after opening it)
How to use:vReturnValue = window.showModalDialog(sURL [, vArguments] [,sFeatures])
vReturnValue = window.showModelessDialog(sURL [, vArguments] [,sFeatures])
Parameter description:
sURL — Required parameter, type: string. Used to specify the URL of the document to be displayed in the dialog box.vArguments - Optional parameters, type: variant. Used to pass parameters to the dialog box. The type of parameters passed is not limited, including arrays, etc. The dialog box obtains the parameters passed in through window.dialogArguments.
sFeatures - Optional parameters, type: string. Used to describe the appearance of the dialog box and other information, you can use one or more of the following, separated by semicolons ";".----------------------------------
Parameter passing:
1. To pass parameters to the dialog box, they are passed through vArguments. There is no limit on the type. For string types, the maximum length is 4096 characters. Objects can also be passed.
parent.html
Copy code
The code is as follows: