Get to know MDN better
このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015年7月.
HTMLTableElement の rows プロパティは読み取り専用で、表のすべての行を表す生きた HTMLCollection を返し、すべての <thead>, <tfoot>, <tbody> 要素に含まれる行を示します。
プロパティ自身は読み取り専用ですが、返されたオブジェクトは生きており、内容を変更することができます。
HTMLCollection で、 HTMLTableRowElement オブジェクトのライブで更新されるリストを提供し、この表に含まれるすべての <tr> 要素を表します。これにより、この表のすべての行を、手作業で探す必要なくすばやくアクセスすることができます。
これは、配列構文(2 行目)と HTMLCollection.item() メソッド(3 行目)の両方を使用して、表の個々の行を取得する方法を示しています。
| HTML # dom-table-rows-dev |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2023年7月17日 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.