Three different types of dialog boxes:
An alert dialog box displays a short message or notification to the user. It includes only an
Alert dialog boxes can be created with
A confirm dialog box is used to ask for user confirmation over any matter. It has two buttons
CANCEL. If the user agrees with whatever written in the box, then he he can click on OK, and then specified action will take place. If the user disagrees, then he can click on CANCEL.
It returns a Boolean value depending on whether the user clicks
CANCEL(false) button and then a specified action takes place.
The prompt dialog box is used to get some input from the user. There are also two buttons
CANCEL like confirm box. It returns the text entered in the input field when the user clicks the
OK, and null if user clicks the
A Prompt box can be created by using