js :鼠标点击后变色或移上去变色;移下来恢复本色,点击后颜色不变

2025-03-10 22:35:35
推荐回答(1个)
回答1:

加上
btn.onmouseout= function () {
btn.style.background = ”本色“;
};即可