Easy Tutorial
❮ Prop Style Overflowx Event Onkeypress ❯

Window alert() Method


Definition and Usage

The alert() method is used to display a warning box with a specified message and an OK button.

Syntax


Browser Support

All major browsers support the alert() method.


Example

Display a warning box:

<script>
function myFunction(){
    alert("Hello, I am a warning box!");
}
</script>

More Examples

Another Popup Example


❮ Prop Style Overflowx Event Onkeypress ❯