JavaScript 对大小写敏感

  1. <!DOCTYPE html>
  2. <html>
  3. <body>
  4.  
  5. <h2>JavaScript 对大小写敏感</h2>
  6.  
  7. <p>请试着把 lastName 改为 lastname。</p>
  8.  
  9. <p id="demo"></p>
  10.  
  11. <script>
  12. var lastname, lastName;
  13. lastName = "Gates";
  14. lastname = "Jobs";
  15. document.getElementById("demo").innerHTML = lastName;
  16. </script>
  17.  
  18. </body>
  19. </html>