Subscribe For Free

Monday, February 26, 2018

How to remove class styles dynamically from div?

A simple button to remove class styles from div dynamically.

<!DOCTYPE html>
        .remStyle {
            width: 50%;
            padding: 25px;
            background-color: #50ff5d;
            color: black;
            font-size: 25px;
            box-sizing: border-box;

        button {
            background-color: #ff7600; 
            border: none;
            color: black;
            padding: 15px 32px;
            text-align: center;
            text-decoration: none;
            display: inline-block;
            font-size: 16px;

<!--test my blog-->

<button><a href=''>Try it</a></button>
<button><a href=''>Home</a></button>

<button onclick="myFunction()">Try it</button>

<div id="remDIV" class="remStyle">
    Hello World.

    function myFunction() {
        var element = document.getElementById("remDIV");



No comments:

Post a Comment

click it