+ 1
can you make it so that when you click on the button its color changes, for example, to red, and when you press it again, it cha
10 odpowiedzi
+ 2
Just change "document.bgColor" to "style.backgroundColor" in the Code Satnam Singh provided for you.
+ 2
thank you
+ 1
thanks
+ 1
and you can make it so that the color changes the button?
+ 1
thank you very much
0
and you can make it so that when you press it again, the button becomes white
0
How you implement the logic is up to you. You've completed the JavaScript tutorial, so you already have if/else and case/break in your arsenal. Happy to help troubleshoot any code you post in Code Playground and link here if you run into issues.
Looking forward.