Skip to content
Advertisement

Onclick Change the Class Style Value without changing Class name

I need to change a value of a Class Style Property Color from RED to GREEN on click.

JavaScript

I need to change the color of c1 class to GREEN.

Note: I dont want it to be done with “ID” & I dont want to create new Class and change the class name. I want it to happen with same class name.

Advertisement

Answer

JavaScript
JavaScript
JavaScript
Advertisement