W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
运行代码
<!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>