Table insertRow() method
Table object
Definition and Usage
The insertRow() method is used to insert a new row at a specified position in a table.
Syntax
tableObject.insertRow(
index
)
| Value | Description |
|---|---|
| index |
Specifies the position where the new row is inserted (starting at 0). |
Browser support





All major browsers support the insertRow() method
Example
Example
Insert a new row at the first position of a table:
| cell 1 | cell 2 |
| cell 3 | cell 4 |
Try it »
Table object