JavaScript 数字

  1. <!DOCTYPE html>
  2. <html>
  3. <body>
  4.  
  5. <h2>JavaScript 数值</h2>
  6.  
  7. <p>写数值有无小数点均可。</p>
  8.  
  9. <p id="demo"></p>
  10.  
  11. <script>
  12. document.getElementById("demo").innerHTML = 15.90;
  13. </script>
  14.  
  15. </body>
  16. </html>