<html>
<body>
<p>你可以在一个语句中声明多个变量:</p>
<button onclick="myFunction()">点我</button>
<p id="demo"></p>
<script>
function myFunction() {
var lastName = "Doe",
age = 30,
job = "carpenter";
document.getElementById("demo").innerHTML = "Name: " + lastName + ". Age: " + age + ". Work: " + job;
}
</script>
</body>
</html>