Use of Pop Up Boxes in JavaScript | Use of Alert Box in JavaScript

Use of Pop Up Boxes in JavaScript | Use of Alert Box in JavaScript

 

In this article, I will share some information about JavaScript. Here I will share a very important topic of JavaScript “Use of Pop Up Boxes in JavaScript” and “Use of Alert Box in JavaScript”. If you also want to know about this topic then you must read this article till the end.

Do you want to become a successful Web Developer?

Do you want to learn about the use of pop up boxes in JavaScript?




If your answer for both of these questions then you are at right place. Here I will explain to you about use of pop up boxed in JavaScript. I hope you will read this article till the end.

If you want to boost your JavaScript Knowledge then you must read this book which is given below.


You should also read these articles.

Switch Case in JavaScript

Introduction of JavaScript

Use of Pop Up Boxes in JavaScript

JavaScript has three kinds of Pop up boxes. The list of pop up boxes is given below.

  • Alert Box
  • Confirm Box
  • Prompt Box

First of all, let’s talk about Alert Box

  1. Use of Alert Box in JavaScript

  • JavaScript has a function of the name alert(). Where we give a message who appeared in the alert box.
  • It has a single button “OK”.
  • If you will use this code then an alert box will arise at the starting of the webpage. And the webpage will not proceed till you press the “OK” button.

Example of Alert Box

<!DOCTYPE html>

<html>

<head>

	<title>Pop Up Boxes</title>

</head>

<body>




<script type="text/javascript">

	alert("This is alert box");

</script>

</body>

</html>

The output of Alert Box

Alert Box in JavaScript




Conclusion

Finally, you got the information about the Use of the alert box in JavaScript. I hope you got this article helpful for you. In the upcoming article, I will share about Confirm box and Prompt box. I hope you will read them. Thank you for reading this article till the end. If this article is helpful for you then please share it with your friends.

 

2 thoughts on “Use of Pop Up Boxes in JavaScript | Use of Alert Box in JavaScript

Leave a Reply

Your email address will not be published. Required fields are marked *