Conditional Statements and Loops
Pop Up Box
What is a Pop up box?
For showing a warning or any other important information to website visitors Popup boxes are used.
The user input string will be returned by prompt method if the user types something,then clicks OK or presses Enter. If the user clicks OK or presses Enter without typing anything into the prompt dialog , the method returns the suggested input, as specified in the second argument passed to prompt. If the user dismisses the dialog by clicking Cancel or pressing Esc or any cancelation action , then in most browsers the prompt method returns null.
What is the difference between confirmation box and alert box?