JavaScript pop-up message box

Updated: 01/31/2019 by Computer Hope
Clock and calendar.

Example

Click the below box to get a message pop-up box.

HTML source code

<button onclick="popupBox()">Click This Button!</button>

Javascript source code

<script type="text/javascript">
       	  function popupBox() {
       	      alert("This is a Javascript pop-up message box.");
       	  }
       	  </script>