加载中...

算术赋值运算符


调试运行

  1. <html>
  2. <head>
  3. <title>算术赋值运算符</title>
  4. </head>
  5. <body>
  6. <script language="javascript">
  7. <!--
  8. a=10; b=10; c=10; d=10;
  9. a+=2;
  10. document.write("a+=2 a=",a,"<br>");
  11. b-=2;
  12. document.write("b-=2 b=",b,"<br>");
  13. c*=2;
  14. document.write("c*=2 c=",c,"<br>");
  15. d/=2;
  16. document.write("d/=2 d=",d,"<br>");
  17. //-->
  18. </script>
  19. </body>
  20. </html>

还没有评论.