There are three kinds of popup boxes you can create using JavaScript. You've probably already seen them many times while visiting websites.
The JavaScriopt alert box displays a message to the user. The user will have to click "OK" to proceed.
alert("Hey, remember to tell your friends about Website-Tutorial.net!");
The JavaScript confirm function is very similar to the alert function. In addition, it supplies the user with a choice, they can either click OK to confirm the popup's message or press Cancel and not agree to the popup's content.
confirm("A JavaScript Confirm asks user to make a decision (e.g. Please confirm it is OK to proceed...)");
The prompt popup box let the user to enter value before to proceed. The user will have to either cilck OK or Cancel to proceed after entering an input value.
prompt("A JavaScript Prompt asks user to enter information (e.g. Please enter your first name...)","");