W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
运行代码
<!DOCTYPE html> <html> <body> <h2>JavaScript 数据类型</h2> <p>当字符串和数值相加时,JavaScript 将把数值视作字符串。</p> <p id="demo"></p> <script> var x = "Porsche" + 911; document.getElementById("demo").innerHTML = x; </script> </body> </html>