Javascript - Add, Remove, Toggle Class Name
How To Insert, Delete, Toggle Class In Javascript
In This Javascript Tutorial we will See How To Add, Remove, or Toggle, and Show All className of an HTML element using JS And Netbeans Editor .
Project Source Code:
div{background-color: #999;width: 200px;height: 80px}
.class1{border:2px solid red;}
.class2{background-color: yellow;}
.class3{margin-left: 50px;}
.class4{width:300px;}
OUTPUT:
default state |
remove class |
add class |
toggle class: click 1 |
toggle class: click 2 |
Posting Komentar untuk "Javascript - Add, Remove, Toggle Class Name"