insertRow method

HTMLTableRowElement insertRow([
  1. int index
])

The insertRow() method of the HTMLTableElement interface inserts a new row (tr) in a given table, and returns a reference to the new row.

If a table has multiple tbody elements, by default, the new row is inserted into the last <tbody>. To insert the row into a specific section, use HTMLTableSectionElement.insertRow

Note: insertRow() inserts the row directly into the table. The row does not need to be appended separately as would be the case if Document.createElement had been used to create the new <tr> element.

Implementation

external HTMLTableRowElement insertRow([int index]);