Welcome aboard! We are happy you are here and wish you good net-raft!
<html>
<head>
<title></title>
<meta charset="utf-8">
<script type="text/javascript">
function clear_style() {
document.getElementsByTagName("DIV")[0].removeAttribute("class");
}
function back_style() {
document.getElementsByTagName("DIV")[0].classList.add('democlass');
}
</script>
<style>
.democlass {
color: red;
}
</style>
</head>
<body>
<div class="democlass">
Hello world!
</div>
<button onclick="clear_style()">Clear</button>
<button onclick="back_style();">Back</button>
</body>
</html>
The most helpful JAVASCRIPT solutions
How can I get the last day and the next day in javascript ?JAVASCRIPT Click to see more ... 5.8K 507