prompt Method

DHTML, HTML, & CSS

prompt Method


Displays a dialog box that prompts the user with a message and an input field.

Syntax

vTextData = window.prompt([sMessage]  [, sDefaultValue])

Parameters

sMessageOptional. String that specifies the message to display in the dialog box. By default, this parameter is set to "".
sDefaultValueOptional. 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.

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
Version data is listed when the mouse hovers over a link, or the link has focus.
window

Back to topBack to top

Did you find this topic useful? Suggestions for other topics? write us!Internet Link

© 1999 microsoft corporation. all rights reserved. terms of useInternet Link.