此处有一个按钮,并添加了两个复选框。我试图做的是,当我点击任何复选框时,按钮颜色应该更改为绿色或任何其他颜色。如果我取消选中所有框,按钮颜色应该变成灰色。请帮帮我。谢谢。如何更改按钮的颜色单击复选框
.input {
font-weight: bold;
border-radius: 1px;
background-color: grey;
}
<input id="input" class="" value=" ... " type="button">
<input type="checkbox" class="check-box">
<input type="checkbox" class="check-box">
<input type="checkbox" class="check-box">
这是非常好的。它的工作完美。感谢您的努力。 –