<button style="background-color:lightblue" id="extractv">
<b>
Extract<br>v
</b>
</button>
...
$("#extractv").click(function () {
$("#extractv").removeAttr("style");
});
有人点击按钮后,我想去掉按钮上的背景色。我不确定为什么它不起作用。
谢谢
戈登
最佳答案
尝试使用
.css('background-color','');
关于jquery,如何在按下按钮后删除按钮颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4271079/