W3cubDocs

/DOM

HTMLTableElement.rows

The HTMLTableElement.rows read-only property returns a live HTMLCollection of all the rows in the table. The rows included in the associated <thead>, <tfoot> and <tbody> elements.

Although the property is read-only, the returned object is live and allows the modification of its content.

Syntax

HTMLCollectionObject = table.rows

Example

myrows = mytable.rows;
firstRow = mytable.rows[0];
lastRow = mytable.rows[mytable.rows.length-1];

Specification

© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableElement/rows