Table rules : Table Layout « Table « JavaScript DHTML






Table rules

    
<html>
<body>
<script language="JavaScript">
    function function1() {
        document.getElementById("myTable").rules = "all";
    }
    function function2() {
        document.getElementById("myTable").rules = "cols";
    }
    function function3() {
        document.getElementById("myTable").rules = "groups";
    }
    function function4() {
        document.getElementById("myTable").rules = "none";
    }
    function function5() {
        document.getElementById("myTable").rules = "rows";
    }
</script>
<table id="myTable" border="" rules="">
<tr>
    <td id="C1">Cell 1</td>
    <td>Cell 2</td>
    <td>Cell 3</td>
</tr>
<tr>
    <td id="C1">Cell 4</td>
    <td>Cell 5</td>
    <td>Cell 6</td>
</tr>
</table>
<input type="button" value='rules = "all"' onClick="function1();">
<input type="button" value='rules = "cols"' onClick="function2();">
<input type="button" value='rules = "groups"' onClick="function3();">
<input type="button" value='rules = "none"' onClick="function4();">
<input type="button" value='rules = "rows"' onClick="function5();">
</body>
</html>

    
      
      








Related examples in the same category

1.Table width
2.Table frame
3.Table cell padding and space Example