TABLE.rows[] (Collection)

A collection of all the rows in a <TABLE>.


DOM level - 1
JavaScript - 1.5
JScript - 3.0
Internet Explorer - 4.0
Netscape - 6.0
Property/method value type:Collection object
JavaScript syntax:-myTABLE.rows

This collection includes any rows inside objects instantiated by <TBODY>, <TFOOT> and <THEAD> tags.

This is not necessarily the same as the rows collection returned from a TBODY object.

The columns and rows are different axes of the table. However they are described in different ways. The cols value is simply an integer that is set to the number of columns. The rows property is a reference to a collection of objects, one row object for each row in the table. Therefore to establish how many cells there are in the table, you need to multiply the table.cols value by the table.rows.length value.

The table.cols value should also be equivalent to table.rows.cells.length value.

See also:Collection object, TABLE.cells[], TABLE.cols, TBODY.rows[], TFOOT.rows[], THEAD.rows[], TR.rowIndex

Property attributes: