人机交互第十周

<html>
 <head>
   <script type="text/javascript">
 num=0
 function a(){
   for(i=0;i<=100;i++)
      {
    if(i%2==0)
                 num+=i;
       }
   alert(num);
      }
   </script>
 </head>
 <body>
   <input type="button" value="click me"    
   onclick="a()"/>
 </body>
</html>
   <input type="button" value="click me"
   onclick="a()"/>
 </body>
</html>

posted @ 2017-11-25 11:24  哈哈哈哈嗝  阅读(98)  评论(0编辑  收藏  举报