Pop-up Boxes

Standard Javascript Objects

Pop-up Boxes

🙋 Need help? Ask an expert now!

There are three standard pop-up boxes, alert box, confirmation box, and prompt box. The alert box contains text and an "OK" button that shows a message in a dialog box. The confirmation box contains text, an "OK" button, and a "cancel" button. The prompt box contains text and an input field with a default value. Run the program below to see all three pop-up boxes one by one.

Run the sample program above if you haven't already done so. Running the program above will call create three different pop-up boxes. Each of these pop-up boxes are unique and are to be used when it is appropriate to do so. These three methods are part of the Window object, which is supported by almost all browsers.

Edit Me on GitHub!

Application Question

Which of the following statements are examples of pop-up boxes?