'color' Example : Color : Style Layout JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Style Layout » Color »

 

'color' Example



    
<html>
<body>
<script language="JavaScript">
    function function1() {
       document.getElementById("myFont").color = "green";
    }
    function function2() {
       document.getElementById("myFont").color = "maroon";
    }
</script>
<p>
    <font face="Verdana" id="myFont">
        <b>Sample text.</b>
    </font>
</p>
<button onClick="function1();">Make Text Green</button>
<button onClick="function2();">Make Text Maroon</button>
</body>
</html>

    
      
      



-

Leave a Comment / Note


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

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Style Layout
» Color