HTMLTableRowElement : HTMLElement

A table row (tr) element in an HTML table.

Browser/User Agent Support

IEMozillaNetscapeOperaSafariNetscapte
4.0+1.0+6.0+7.0+1.0+no

Constructors

ConstructorIEMozillaNetscapeOperaSafariNetscapte
A table row (tr) element in an HTML table.
4.0+1.0+6.0+7.0+1.0+no
 

Properties

PropertyIEMozillaNetscapeOperaSafariNetscapte
Array of all of the HTMLTableCellElement objects in the table row.
4.0+1.0+6.0+7.0+1.0+no
 
Position of the element in the table.
4.0+1.0+6.0+7.0+1.0+no
 
Position of the element within its table section.
4.0+1.0+6.0+7.0+1.0+no
  • IE: Buggy on Mac.

Methods

MethodIEMozillaNetscapeOperaSafariNetscapte
Deletes the cell at the specified position from the row.
4.0+1.0+6.0+7.0+1.0+no
 
Inserts a new empty table cell (td) at the specified position in the row.
4.0+1.0+6.0+7.0+1.0+no
 

Availability

HTML DOM Level 1 | HTML DOM Level 2 | W3C

Constructor Detail

HTMLTableRowElement HTMLTableRowElement()

A table row (tr) element in an HTML table.

Visibility
internal

Property Detail

HTMLCollection cells - read only

Array of all of the HTMLTableCellElement objects in the table row.

For examples, see the quirksmode test page:

http://www.quirksmode.org/dom/tests/table_access.html

Availability

HTML DOM Level 1 | HTML DOM Level 2 | W3C

Number rowIndex - read only

Position of the element in the table.

For examples, see the quirksmode test page:

http://www.quirksmode.org/dom/tests/table_access.html

Availability

HTML DOM Level 1 | HTML DOM Level 2 | W3C

Number sectionRowIndex - read only

Position of the element within its table section.

For examples, see the quirksmode test page:

http://www.quirksmode.org/dom/tests/table_access.html

Availability

HTML DOM Level 1 | HTML DOM Level 2 | W3C

Method Detail

deleteCell(Number index) : void

Deletes the cell at the specified position from the row.

NumberindexIndex position of the cell to delete.

For examples, see the quirksmode test page:

http://www.quirksmode.org/dom/tests/table_credel.html

Availability

HTML DOM Level 1 | HTML DOM Level 2 | W3C

insertCell(Number index) : static HTMLElement

Inserts a new empty table cell (td) at the specified position in the row.

NumberindexIndex position of the cell before where the new cell will be inserted.

For examples, see the quirksmode test page:

http://www.quirksmode.org/dom/tests/table_credel.html

Availability

HTML DOM Level 1 | HTML DOM Level 2 | W3C