document.getElementById('button1').style.backgroundColor="red";document.getElementById('button1').style.backgroundcolor="red";document.getElementById('button1').style.backGroundColor="red";document.getElementById('button1').style.bgcolor="red";请使用 CSS 代替。
<body bgcolor="#E6E6FA">
h1{background-color:#00ff00;}