JavaScript 变量JavaScript 变量<!DOCTYPE html><html><body> <h2>JavaScript 变量</h2> <p>在本例中,x 被定义为变量。然后 x 被赋值 7:</p> <p id="demo"></p> <script>var x;x = 7;document.getElementById("demo").innerHTML = x;</script> </body></html>