Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
insertRow
Collapse the table of content
Expand the table of content

insertRow method

Creates a new row (tr) in the table, and adds the row to the rows collection.

Document Object Model (DOM) Level 2 HTML Specification, Section 1.6.5

 

Syntax


 retVal = object.insertRow(index);

Parameters

index [in, optional]

Type: long

long that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.

Standards information

Remarks

The preferred technique for inserting a row is to add the row at the end of the rows collection. It is faster to add a row at the end of a table than somewhere in the middle. To add a row at the end of the collection, specify the -1 value, or the length of the rows collection minus 1.

See also

Reference
IHTMLTableRow::rowIndex
rows
IHTMLTableRow::sectionRowIndex

 

 

Community Additions

ADD
Show:
© 2015 Microsoft