Delete a Cell : Cell « Table « JavaScript DHTML






Delete a Cell

 
    
<html>
<body>
<script language="JavaScript">
    function function1() {
        document.all.myTr.deleteCell(2);
    }
</script>
<table>
    <tr id="myTr">
        <td>Cell 1</td>
        <td>Cell 2</td>
        <td>Cell 3</td>
        <td>Cell 4</td>
    </tr>
</table>
<input type="button" value="Remove Cell 3" onclick="function1();">
</body>
</html>

    
      
        
  








Related examples in the same category

1.Table Cell background Color Example
2.Table Cell 'background' Example
3.Insert Cell Example
4.Table cell Index Example
5.Table cell Spacing Example
6.Table 'cellPadding' Example
7.Inserrt a table cell