<p> + 号运算符用于连接字符串。</p> <button onclick="myFunction()">点我</button> <p id="demo"></p> <script> function myFunction() { var text1 = "Good "; var text2 = "Morning"; text1 += text2 document.getElementById("demo").innerHTML = text1; } </script>