JAVASCRIPT remove style javascript - Net-Raft.com

Welcome aboard! We are happy you are here and wish you good net-raft!




Just a Web Code Solution

remove style using javascript


 306

Show ResultJAVASCRIPT


2

<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>


By     Created   
The power of the user (%)
72%



The most helpful JAVASCRIPT solutions

How to get client machine name or computer name with javascript ?How to get client machine name or computer name with javascript ?JAVASCRIPT

Click to see more ...

  5.3K     384

get client hostname javascriptget client hostname javascriptJAVASCRIPT

Click to see more ...

  3.2K     263

detect ie javascriptdetect ie javascriptJAVASCRIPT

Click to see more ...

  1.8K     167

Create fireworks using javascriptCreate fireworks using javascriptJAVASCRIPT

Click to see more ...

  1.6K     136

create 3d barrel using javascriptcreate 3d barrel using javascriptJAVASCRIPT

Click to see more ...

  1.5K     99

how to create foreach class using javascript ?how to create foreach class using javascript ?JAVASCRIPT

Click to see more ...

  1K     83

get ip address javascriptget ip address javascriptJAVASCRIPT

Click to see more ...

  823     76

create qr code javascriptcreate qr code javascriptJAVASCRIPT

Click to see more ...

  573     71

get filename using javascript get filename using javascript JAVASCRIPT

Click to see more ...

  559     61

how to create the connect to a database with ADODB using javascript ?how to create the connect to a database with ADODB using javascript ?JAVASCRIPT

Click to see more ...

  533     59