<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<div>
<ul>
<li>列表一</li>
<li>列表二</li>
<li>列表三</li>
</ul>
</div>
<script type="text/javascript">
let red=document.getElementsByClassName{'header'};
red[0].style.backgroundColor='green';
</script>
</body>
</html>