What is a prompt box?

Forums JavaScriptWhat is a prompt box?
Staff asked 8 months ago

Answers (1)

Add Answer
Hardik Ghevariya Marked As Accepted
Staff answered 8 months ago

The prompt() method displays a dialog box that prompts the user for input.

The prompt() method returns the input value if the user clicks “OK”, otherwise it returns null.

Example:

prompt("Please enter your name");

 

Subscribe

Select Categories