codescracker


javascript

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.

<!DOCTYPE HTML>
<html>
<head>
	<title>JavaScript alert Box</title>
</head>
<body>

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

</body>
</html>

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

javascript alert box

« Previous Tutorial Next Tutorial »



Tools
Calculator

Quick Links
Signup - Login - Give Online Test