- Alert () is a warning message box that belongs to the member function in the BOM, which is Window.alert (); Window.alert function Popup dialog box is a modal dialog box, the user must close the message box to continue to operate, because JS does not have input and output, so the browser window object provides two functions alert and prompt corresponding output and input;
- Prompt () is a prompt message box where the user can enter a string as prompted, such as var name = prompt (' Enter name '), which is the new declaration of a variable name, which is used to receive user input values;
- Confirm () is a confirmation message box, confirm () and alert () similar, just a "Cancel button", the return value of the Confirm method is a Boolean type value, that is true and false; You can use the confirmation message box to ask the user a "yes" or "no" problem;
What is the difference between alert () confirm () prompt ()?