Click the following to see the result

<html>
 
   <head>
     
      <script type="text/javascript">
         <!--
            function myFunc()
            {
               var a = 100;
               try {
                  alert("Value of variable a is : " + a );
               }
             
               catch ( e ) {
                  alert("Error: " + e.description );
               }
            }
         //-->
      </script>
     
   </head>
 
   <body>
      <p>Click the following to see the result:</p>
     
      <form>
         <input type="button" value="Click Me" onclick="myFunc();" />
      </form>
     
   </body>
</html>

Comments

Popular posts from this blog

java script book in PDF format

auto redirected page in java script