Table Cell background Color Example : Cell : Table JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Table » Cell »

 

Table Cell background Color Example



    
<html>
<head>
<script>
    function function1() {
        document.all.myTD.bgColor = "red";
    }
    function function2() {
        document.all.myTD.bgColor = "";
    }
</script>
</head>
<body bgcolor="#ccffcc" text="#000000">
<table>
   <tr>
       <td id="myTD" height="79">Cell content</td>
       <td height="79">Cell content</td>
   </tr>
</table>
<input type="button" value="Add background color to Cell 1" onClick="function1();">
<input type="button" value="Remove background colors" onClick="function2();">
</body>
</html>

    
      
      



-

Leave a Comment / Note


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

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Table
» Cell