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 = 'Bill Gates';
  13. </script>
  14.  
  15. </body>
  16. </html>