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月.
HTMLTableRowElement.rowIndex は読み取り専用プロパティで、表 (<table>) 全体に対する行の相対的な位置を表します。
<thead>、<tbody>、<tfoot> の各要素が HTML の中で順不同であっても、ブラウザーは表を正しい順序で描画します。従って行のカウントは <thead> から <tbody> へ、 <tbody> から <tfoot> へと進みます。
行の位置を返します。行が表に所属していない場合は -1 です。
この例は、 JavaScript を使用して表のすべての行に行番号を振ります。
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2023年7月20日 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.