<!DOCTYPE html>
<html>

  <head>
    <script type="text/javascript">
      function msg()
      {
        alert("This is an Alert Box");
      }
    </script>
  </head>

  <body>
    <button type="button" onClick="msg()">Click</button>
  </body>

</html>