Display table of 2

        
<!doctype html>
<html>
   <head>
       <title>Display table of 2</TITLE>
   </HEAD>
   <body>
<h1>Display numbers from 1 to 100 even numbers  </h1>
       <form name="f1">
           <input type="submit" value="Display table of 2" onClick="display()">
       </form>
    </body>
    <script language="Javascript">
          function display()
          {
              var i;
              document.writeln("table of 2 is as follows:<br>");
              for(i=1;i<=10;i++)
              {
                document.writeln("2*"+i+"="+(2*i)+"<br>");
              }
          }
     </script>
</html>


        
    


Go back