请问:为啥调试结果显示不是红色的字
哪位大神能告诉我为什么我的调试结果不对,谢谢(代码如下)
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>bad domReady</title>
<script>
setTimeout(function(){
document.getElementById("header").style.color="red";
},3000)
</script>
</head>
<body>
<h1 id="header">这里是h1元素包含的内容</h1>
</body>
</html>