TableHeaderabbrプロパティ_
例
IDが「myTh」の<th>要素のabbr属性の値を返します。
var x = document.getElementById("myTh").abbr;
定義と使用法
abbrプロパティは、abbr属性の値を設定または返します。
abbr属性は、ヘッダーセルのコンテンツの短いバージョンを指定します。
注: abbr属性は、通常のWebブラウザーでは視覚効果がありませんが、スクリーンリーダーで使用できます。
ブラウザのサポート
Property | |||||
---|---|---|---|---|---|
abbr | Yes | Yes | Yes | Yes | Yes |
構文
abbrプロパティを返します。
tableheaderObject.abbr
abbrプロパティを設定します。
tableheaderObject.abbr = text
プロパティ値
Value | Description |
---|---|
text | Specifies a short description of the header cell content |
技術的な詳細
戻り値: | ヘッダーセルの内容の簡単な説明を表す文字列 |
---|
その他の例
例
IDが「myTh」の<th>要素のabbr属性の値を変更します。
document.getElementById("myTh").abbr = "newValue";
関連ページ
HTMLリファレンス:HTML <th> abbr属性
❮TableHeaderオブジェクト