Displays a dialog box that prompts the user with a message and an input field.
Syntax
vTextData = window.prompt( [sMessage] [, sDefaultValue])
Parameters
sMessage |
Optional.
String that specifies the message to display in the dialog box. By default, this parameter is set to "" . |
sDefaultValue |
Optional.
String that specifies the default value of the input field. By default, this parameter is set to "undefined" . |
Return Value
String or Integer. Returns the value typed in by the user.
Remarks
The title of this dialog box cannot be changed.
Windows Internet Explorer 7 and later. By default, this method is blocked by the information bar in the Internet zone. This helps prevent malicious sites from initiating spoofing attacks. For more information, please see WebBrowser Customization.
Standards Information
There is no public standard that applies to this method.
Applies To