Table deleteRow() method
Table object
Definition and Usage
The deleteRow() method is used to delete a row at a specified position from a table
Syntax
tableObject.deleteRow(
index
)
| Value | Description |
|---|---|
| index | Specifies the numeric index of the row to delete (starting at 0). |
Browser support





All major browsers support the deleteRow() method
Example
Example
Delete the first row of a table:
| cell 1 | cell 2 |
| cell 3 | cell 4 |
Try it »
More examples
Delete a table row after a click
This example uses the deleteRow() method to delete a row after clicking
Table object