Table frame : Table Layout « Table « JavaScript DHTML






Table frame

    
<html>
<body>
<script>
    function function1() {
        document.getElementById("myTable").frame = "void";
    }
    function function2() {
        document.getElementById("myTable").frame = "above";
    }
    function function3() {
        document.getElementById("myTable").frame = "below";
    }
    function function4() {
        document.getElementById("myTable").frame = "border";
    }
    function function5() {
        document.getElementById("myTable").frame = "box";
    }
    function function6() {
        document.getElementById("myTable").frame = "hsides";
    }
    function function7() {
        document.getElementById("myTable").frame = "lhs";
    }
    function function8() {
        document.getElementById("myTable").frame = "rhs";
    }
    function function9() {
        document.getElementById("myTable").frame = "vsides";
    }
</script>
<table id="myTable" width="542" bordercolor="blue" cellspacing="5" cellpadding="5">
    <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='Frame = "above"' onClick="function2();">
<input type="button" value='Frame = "below"' onClick="function3();">
<input type="button" value='Frame = "border"' onClick="function4();">
<input type="button" value='Frame = "box"' onClick="function5();">
<input type="button" value='Frame = "hsides"' onClick="function6();">
<input type="button" value='Frame = "lhw"' onClick="function7();">
<input type="button" value='Frame = "rhs"' onClick="function8();">
<input type="button" value='Frame = "vsides"' onClick="function9();">
<input type="button" value='Frame = "void"' onClick="function1();">
</body>
</html>

    
      
      








Related examples in the same category

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