HTML DOM alert() Method
Complete Window Object Reference
Definition and Usage
The alert() method is used to display an alert box with a specified message and an OK button.
Syntax
Example
<html>
<head>
<script type="text/javascript">
function display_alert()
{
alert("I am an alert box!!")
}
</script>
</head>
<body>
<input type="button" onclick="display_alert()"
value="Display alert box" />
</body>
</html>
|
Try-It-Yourself Demos
Display an alert box
Alert box with line-breaks
Complete Window Object Reference
 |

|
|
See why there are 20,000+ Ektron integrations worldwide.
Request an INSTANT DEMO or download a FREE TRIAL today. |
|
|
|