Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM tr deleteCell() method

tr deleteCell() method

tr Object Reference tr object


Definition and Usage

The deleteCell() method is used to delete a cell (element) in a table row.

Syntax

trObject.deleteCell(

index

)

Value Description
index

The parameter index is the position of the cell to be deleted within the row.

This method deletes the cell at the specified position in the table row.


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the deleteCell() method


Example

Example

The example below deletes a cell from a row:

Runoob Tutorial(runoob.com)

    

        

        

        

    

First cell Second cell Third cell

Try it »


tr Object Reference tr object