close

      簡單的JavaScrpit 筆記,怕以後會忘記,所以做個小筆記,方便備查! 詳情請入內

顯示結果如下:

      a = "37" + 7 = 377

      b = 37 + 7 = 44

      p = "37" - 7 = 30

      q = 37 - 7 = 30

      x = 168 + "abc" = 168abc

      y = "abc" + 168 = abc168

 

語法如下:

<Script>

       var a = "37"+7;
       var b = 37+7;

       var p = "37"-7;
       var q = 37-7;

       var x = 168 + "abc";
       var y = "abc" + 168;

      document.write("a = \"37\" \+ 7 = " + a + "<P>");
      document.write("b = 37 \+ 7 = " + b + "<P>");

      document.write("p = \"37\" - 7 = " + p + "<P>");
      document.write("q = 37 - 7 = " + q + "<P>");

      document.write("x = 168 + \"abc\" = " + x + "<P>");
      document.write("y = \"abc\" + 168 = " + y + "<P>");

</Script>

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 dreamtails 的頭像
    dreamtails

    雜七雜八的小筆記!

    dreamtails 發表在 痞客邦 留言(0) 人氣()