本帖最後由 張彥承 於 2014-7-15 16:33 編輯
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title>我的五則運算</title>
- </head>
- <body>
- <script type="text/javascript">
- var a = 7;
- var b = 9;
- alert("a是" + a + ",b是" + b)
- alert("a+b=" + (a + b));
- alert("a-b=" + (a - b));
- alert("a*b=" + (a * b));
- alert("a/b=" + (a / b));
- alert("a取餘數b=" + (a % b));
- </script>
- </body>
- </html>
複製代碼 |