prompt

Core function

Syntax

prompt( message[, inputDefaults] )

Parameters

Parameter Description
message String message to display.
inputDefaults A string or integer representing the default value of the input field.

Description

Displays a prompt dialog box with a message and an input field that receives user input. Returns the user input if 'OK' was pressed, null if dialog was canceled.

Form API versions < 2.1: the function returned inputDefaults if dialog was canceled.

Examples

See Also

alert, confirm

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.