0
Button color javascript
I use o mouse down to change color button with document.getElementById(âdemoâ).style.background = âredâ; But how I get back itâs original default color with onmouseup?
1 Answer
+ 5
use css.
#demo:active{
background: red;
}
this way, it'll back to original color