被字符串除的数不再是数

  1. <!DOCTYPE html>
  2. <html>
  3. <body>
  4.  
  5. <h1>JavaScript 数字</h1>
  6.  
  7. <p>用非数字字符串进行除法会得到 NaN(Not a Number):</p>
  8.  
  9. <p id="demo"></p>
  10.  
  11. <script>
  12. document.getElementById("demo").innerHTML = 100 / "Apple";
  13. </script>
  14.  
  15. </body>
  16. </html>