deleteCell

HTML (DHTML)

deleteCell Method

Internet Development Index

Removes the specified cell (td) from the table row, as well as from the cells collection.

Syntax

TR.deleteCell( [iIndex])

Parameters

iIndex Optional. Integer that specifies the zero-based position of the cell to remove from the table row. If no value is provided, the last cell in the cells collection is deleted.

Return Value

No return value.

Example

This example uses the deleteCell method to delete the last cell in the first row of the table.

document.all.myTable.rows[0].deleteCell() 

Standards Information

This method is defined in World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1 Non-Microsoft link.

Applies To

TR

See Also

deleteRow, insertCell