JavaScript 关键词

  1. <!DOCTYPE html>
  2. <html>
  3. <body>
  4.  
  5. <h2>var 关键词创建变量</h2>
  6.  
  7. <p id="demo"></p>
  8.  
  9. <script>
  10. var x, y;
  11. x = 7 + 8;
  12. y = x * 10;
  13. document.getElementById("demo").innerHTML = y;
  14. </script>
  15.  
  16. </body>
  17. </html>