So, I am trying to change the class for a input box using javascript and can't seem to get it right.
I have 2 CSS classes.
The normal class is .butz and the one I want the button to change to when its clicked is .butzz
So, I have this for my html:
<input id="butval1" class="butz" type="button" name="design1" value="Choose Design" onclick="" />
and this is my js
document.getElementById("butval1").className += "butzz";
What I really want to do, is change the class from butz to butzz or... if possible, change the background color of my button with getElementByClassName
I have 9 buttons that are all in the same class, and I want the one clicked, to change to green or #24f000
thank you all