Result Size: 625 x 534
x
 
<!DOCTYPE html>
<html>
<body>
<h2>分配 JavaScript 值</h2>
<p>在 JavaScript 中,= 运算符用于为变量赋值。</p>
<p id="demo"></p>
<script>
var x, y;
x = 5;
y = 6;
document.getElementById("demo").innerHTML = x + y;
</script>
</body>
</html>