javascript入门之算术乘法表

<!DOCTYPE html>
<html>
  <head>
    <title>算术乘法表</title>
    
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="this is my page">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    
    <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->

  </head>
  <script language="javascript">
   function show(){
   var i;
   var j;
   for(i=1;i<=9;i++){
      for(j=1;j<=i;j++){
      document.write(j+"*"+i+"="+i*j);
      document.write("&nbsp&nbsp");
      }
      document.write("<br/>");
   }
   }
  </script>
  <body>
    <input type="button" value="算术乘法表" onclick="show()"/>
    <br>
  </body>
</html>

 

posted on 2019-06-16 15:33  一颗小白杨站在哨所旁  阅读(236)  评论(0编辑  收藏  举报

导航