Days
Hours
Minutes
Seconds

Super Black Friday Sale!

0
No products in the cart.
  • This topic is empty.
Viewing 31 post (of 31 total)
  • Author
    Posts
  • #9683
    abctest483
    Member

    To change the class you can use following functiionalities:

    HTML:

    <button id="myButton">Click me</button>
    

    Javascript:

    const button = document.getElementById('myButton');
    
    button.onclick = function() {
      button.classList.add('newClass');
    };
    

    CSS:

    .newClass {
        background-color: red;
        color: white;
      }
    
Viewing 31 post (of 31 total)
  • You must be logged in to reply to this topic.