HTMLTableElement.tBodies

The HTMLTableElement.tBodies read-only property returns a live HTMLCollection of the table bodies.

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

The collection returned includes implicit <tbody> elements. E.g.

HTML
<table>
  <tr>
    <td>cell one</td>
  </tr>
</table>

The HTML DOM generated from the above HTML will have a <tbody> element even though the tags are not included in the source HTML.

Syntax

JavaScript
HTMLCollectionObject = table.tBodies

Example

js;gutter:false
length(mytable.tBodies);

License

© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-us/docs/web/api/htmltableelement/tbodies

API HTML DOM HTMLTableElement NeedsSpecTable Property Read-only Reference Référence