rows | NN 6 IE 4 DOM 1 | |||
Provides a collection of all tr element objects contained in a single table, tbody, tfoot, or thead element object. The rows collection of a table element includes all rows of the table, regardless of row groups. Collection members are sorted in source code order. Internet Explorer lets you use array notation or parentheses to access a single row in the collection (e.g., document.getElementById("myTable").rows[0], document.all.myTable.rows (0)). |
||||
Object Model Reference | ||||
document.getElementById("tableOrSectionID").rows
|
||||
Object-Specific Properties | ||||
|
||||
Object-Specific Methods | ||||
|
||||
Object-Specific Event Handler Properties | ||||
None. |
length | NN 6 IE 4 DOM 1 |
Read-only | |
Returns the number of elements in the collection. |
|
Example | |
var howMany = document.getElementById("myTable").rows.length; |
|
Value | |
Integer. |
item( ) | NN 6 IE 4 DOM 1 |
item(index[, subindex]) item(index) | |
Returns a single tr object or collection of tr objects corresponding to the element matching the index value (or, optionally in IE, the index and subindex values). |
|
Parameters | |
|
|
Returned Value | |
One tr object or collection (array) of tr objects. If there are no matches to the parameters, the returned value is null. |
namedItem( ) | NN 6 IE 6 DOM 1 |
namedItem("ID") | |
Returns a single tr object or collection of tr objects corresponding to the element matching the parameter string value. |
|
Parameters | |
|
|
Returned Value | |
One tr object or collection (array) of tr objects. If there are no matches to the parameters, the returned value is null. |
urns( ) | NN n/a IE 5(Win) DOM n/a |
urns(URN) | |
See the all.urns( ) method. |