Alert Dialog Boxes in Javascript  

Alert box can utilized for variety of things, such as to display when an input field has not been entered properly, to display a message on document open or close, or to inform someone that they have clicked a link to leave your site.

0 496 Technology | Javascript
Wed Dec 26 , 2018

The Alert Box is probably the most popular one dialog box in javascript.

Syntax

alert("message")

Example


<html>  
<title>JavaScript Alert Dialog Box</title>   
<body>  
    
<form>
<input type="button" value="Open Alert Box" onClick='alert("Place Your Message Here...\n Click OK to continue.")'>
</form>

</body> 
</html>



Output



Subscribe & Get Regular Updates On Your E-mail