Window alert() method
Window Object
Definition and Usage
The alert() method is used to display an alert box with a specified message and a button. Confirm button alert box.
Syntax
alert(
message
)
Browser support





All major browsers support the alert() method
Example
Example
Display an alert box:
Try it »
More examples
Window Object