JavaScript 字符串相加
- <!DOCTYPE html>
- <html>
- <body>
- <h1>JavaScript 变量</h1>
- <p>相加 "Bill" + " " + "Gates" 的结果是:</p>
- <p id="demo"></p>
- <script>
- var x = "Bill" + " " + "Gates";
- document.getElementById("demo").innerHTML = x;
- </script>
- </body>
- </html>
本文档使用 技术池 构建