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.createCaption() メソッドは、この <table> に関連付けられた <caption> 要素を返します。 この表に <caption> 要素がない場合が、このメソッドは生成して返します。
メモ: キャプションが存在しない場合、 createCaption() は新しいキャプションを表に直接挿入します。 Document.createElement() を使用して新しい <caption> 要素を生成する場合とは異なり、キャプションを個別に追加する必要はありません。
なし。
この例は JavaScript を使用して、表に最初は存在しないキャプションを追加します。
| HTML # dom-table-createcaption-dev |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2024年7月31日 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.