Result Size: 625 x 534
x
 
<!DOCTYPE html>
<html>
<body>
<h2>JavaScript 数字</h2>
<p>如果您添加一个数字和一个数字字符串,结果将是一个连接的字符串:</p>
<p id="demo"></p>
<script>
var x = 10;
var y = "20";
var z = x + y;
document.getElementById("demo").innerHTML = z;
</script>
</body>
</html>