2017  Kodetalk | Feedback | Privacy Policy | Terms | About

Change an element's class with JavaScript

How can I change a class of an HTML element in response to an onClick event using JavaScript?

If you are using Javascript then below script will help to change the class name at the time of onClick event.

          function modifyClass(){


Answer is