0
Why can't the style property work in JavaScript?
2 Antworten
+ 5
You are using an attribute to describe the color:
<... fill = "black" ... />
You want to do something like this:
one.setAttribute("fill","blue");
Also remember to add ; at the end of the lines
+ 5
The way you're about to do it will take very long to code, do you want to know a quicker route?
(Not the quickest tho)
(Edit)
Here it is:
https://code.sololearn.com/W2rDNqr5t1LB/?ref=app