+ 1
How can I Make the background color of the white buttons change color when clicked on any one color and click a button?
3 Respuestas
+ 4
function changeColor(a) {
document.getElementById("cell" ).style.background =a;
}
First of all Learn difference between class and id, you are using id multiple times which is wrong it will hit only first one and leave the rest. Use class instead.
+ 1
thanks