Source Code:
(back to article)
Submit
Result:
Report an issue
99
1
2
3
4
5
6
7
8
9
10
›
⌄
⌄
⌄
<
style
>
.
existing-class
{
text-decoration:
underline
;
color:
red
;
}
</
style
>
<
div
id=
"myDiv"
class=
"existing-class"
>Another manipulation example</
div
>
<
script
>
document.getElementById(
"myDiv"
).classList.remove(
"existing-class"
);
</
script
>
<style> .existing-class { text-decoration: underline; color: red; } </style> <div id="myDiv" class="existing-class">Another manipulation example</div> <script> document.getElementById("myDiv").classList.remove("existing-class"); </script>