html中
<button onclick="div.style.backgrounfdColor='red'"></button>
js中
<script>
button.onclick="function(){button.style.backgroundColor='red'}":
</script>
html中
<button onclick="div.style.backgrounfdColor='red'"></button>
js中
<script>
button.onclick="function(){button.style.backgroundColor='red'}":
</script>