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

insertCell method

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

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

 

Syntax


 retVal = object.insertCell(index);

Parameters

index [in, optional]

Type: long

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

Standards information

Remarks

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

See also

Reference
IHTMLTableRow4::deleteCell
IHTMLTable::insertRow

 

 

Community Additions

ADD
Show:
© 2015 Microsoft