JavaScript » Functions » alert

Syntax:
alert(message)

This function accepts a message as an argument and displays an alert message box containing the message to the user.

Examples

Code:
<input type="button" value="Click Me" onclick="alert('You clicked me!')">
Output:
Language(s): JavaScript