HTMLTableElement: tBodies プロパティ
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
HTMLTableElement.tBodies
は読み取り専用のプロパティで、生きた HTMLCollection
で <table>
の本体を返します。
このプロパティは読み取り専用ですが、返値のオブジェクトは生きており、内部を変更することができます。
返されるコレクションには、暗黙の <tbody>
要素を含みます。例えば、
html
<table>
<tr>
<td>セル 1</td>
</tr>
</table>
上記の HTML から生成される HTML DOM には、 HTML ソースにタグが含まれていなくても、 <tbody>
要素が存在しています。
値
生きた HTMLCollection
です。
例
このスニペットは、表の中の本体の数を数えます。
js
mytable.tBodies.length;
仕様書
Specification |
---|
HTML # dom-table-tbodies-dev |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
tBodies |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.