alert

Displays an alert dialog box with a message and an OK button.

Core function

Syntax

alert( message )

Parameters

Parameter Description
message The message string to be displayed.

Description

Alert is a top-level function and is not associated with any object.
The alert function may be used to display any message that does not require a user decision. The message argument specifies the message that the dialog box contains.

Examples

To create an Alert dialog:

See Also

prompt

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