x
 
<!DOCTYPE html>
<html>
<body>
<h1 id="demo">Document 对象</h1>
<h2>getElementById() 方法</h2>
<script>
document.getElementById("demo").style.color = "red";
</script>
</body>
</html>