Friday, April 12, 2024

Javascript-Lesson2 - Functions

 <!DOCTYPE HTML>

<html>

<head>

 <title> Functions</title>

</head>

<body bgcolor="aqua">

   <h1>Functions in Javascript</h1>


   <script>

      //document.write("Welcome to programming world of javascript");

      function hello(){

         //document.write("Welcome to programming world of javascript");

         alert("Welcome to programming world of javascript");


      }

      //hello();

   </script>

      <!--create button call above hello() function in onclick -->

      <input type="button" value="Click Here" onclick="hello()" />

</body>

</html>

No comments:

Post a Comment