Today we are going to play with popup boxes and JavaScript!
What we are going to do is very simple. First of all we will create the code for a button that will trigger a simple alert box. Then we are going to create a confirm box and a prompt box.
The alert box
The JavaScript syntax used to make an alert box is:
alert("text");
The code itself is very simple and will pop up an alert box with an "ok" button. In order to close the box, the user needs to click the "ok" button. The following is a good example: