Differentiate between alert and prompt dialog box giving suitable example.

SOLUTION....

Feature Alert Prompt
Purpose Used to display a message to the user Used to take input from the user
User Input Does not take input (only shows “OK” button) Accepts user input through a text field
Return Value Returns undefined (nothing to capture) Returns the text entered by the user, or null if cancelled
Buttons Has only OK button Has OK and Cancel buttons
Use Case Showing warnings, notifications, information Asking user for input, like name or age

Leave a Reply

Your email address will not be published. Required fields are marked *

sign up!

We’ll send you the hottest deals straight to your inbox so you’re always in on the best-kept software secrets.