1, Warning message box alert ()
The alert method has a parameter, which is the text string that you want to display to the user. The string is not in HTML format. The message box provides a OK button to let the user close the message box, and the message box is a modal dialog box, which means that the user must close the message box before proceeding.
2, Confirm message box confirm ()
Use the confirmation message box to ask the user a yes-or-no question, and the user can choose to click the OK button or click the Cancel button. The return value of the Confirm method is true or false. The message box is also a modal dialog box: The user must close the dialog box (click a button) before the next action can be made.
3, Prompt message box prompt ()
The Hint message box provides a text field where the user can enter an answer in response to your prompt. The message box has a "OK" button and a "Cancel" button. If you provide a secondary string argument, the prompt message box displays the auxiliary string as the default response in the text field. Otherwise, the default text is "<undefined>". Similar to the alert () and Confirm () methods, the Prompt method also displays a modal message box. The user must close the message box before continuing.
4, example
JS Popup Dialog Function alert (), confirm (), prompt ()