'className' Example : className : Node Operation JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Node Operation » className »

 

'className' Example



    
<html>
<head>
<script language="JavaScript">
    function function1() {
        document.getElementById("myP").className = "myC"
    }
</script>
<style>
.myC 
    font-family:verdana, arial; 
    font-weight:bold; 
    font-size:16px; 
}
</style>
</head>
<body>
<p id="myP" 
   style="text-decoration:underline; cursor:hand;"
   onclick="function1()">
Render this text using the myC class</p>
</body>
</html>

    
      
      



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Node Operation
» className