prompt

prompt is a dialog box with an input field, an OK button, and a Cancel button.

It displays a message to the screen that needs a varied response.

Syntax

result = window.prompt(message, value);

Example

External

Mozilla Developer Network