W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
运行代码
<!DOCTYPE html> <html> <body> <h1>JavaScript 运算符</h1> <p>对数字和字符串相加,会返回字符串。</p> <p id="demo"></p> <script> var x = 7 + 8; var y = "7" + 8; var z = "Hello" + 7; document.getElementById("demo").innerHTML = x + "<br>" + y + "<br>" + z; </script> </body> </html>