JavaScript alert Box

« Previous Tutorial Next Tutorial »

An alert box in JavaScript is mainly used to display an alert message while executing JavaScript code.

JavaScript alert Box Example

Here is an example demonstrates how to use alert box in JavaScript to display an alert message.

   <title>JavaScript alert Box</title>

<h3>JavaScript alert Box Example</h3>
<script type="text/javascript">
   alert("Welcome to! This is an alert box.");


Here is the sample output of the above JavaScript alert box example:

javascript alert box

JavaScript Online Test

« Previous Tutorial Next Tutorial »

© Copyright 2021. All Rights Reserved.