JavaScript 代码是一系列语句

  1. <!DOCTYPE html>
  2. <html>
  3. <body>
  4.  
  5. <h2>JavaScript 语句</h2>
  6.  
  7. <p>在 HTML 中,JavaScript 语句由浏览器执行。</p>
  8.  
  9. <p id="demo"></p>
  10.  
  11. <script>
  12. document.getElementById("demo").innerHTML = "Hello Kitty.";
  13. </script>
  14.  
  15. </body>
  16. </html>