tbody elementtable element, after any caption, colgroup, and thead elements, but only if there are no
tr elements that are children of the
table element.tr elements
interface HTMLTableSectionElement : HTMLElement {
readonly attribute HTMLCollection rows;
HTMLElement insertRow(optional long index);
void deleteRow(long index);
};
The HTMLTableSectionElement
interface is also used for thead and tfoot elements.
The tbody element represents
a block of rows that consist of a body of data for the
parent table element, if the tbody element has a parent and it is a
table.
rowsReturns an HTMLCollection
of the tr elements of the table section.
insertRow( [ index ] )Creates a tr element, inserts it into the table section at
the position given by the argument, and returns the tr.
The position is relative to the rows in the table section. The index −1, which is the default if the argument is omitted, is equivalent to inserting at the end of the table section.
If the given position is less than −1 or greater than the number
of rows, throws an IndexSizeError
exception.
deleteRow(index)Removes the tr element with the given position in the table
section.
The position is relative to the rows in the table section. The index −1 is equivalent to deleting the last row of the table section.
If the given position is less than −1 or greater than the index
of the last row, or if there are no rows, throws an IndexSizeError
exception.