HTMLDOM凡例オブジェクト
凡例オブジェクト
Legendオブジェクトは、HTMLの<legend>要素を表します。
凡例オブジェクトにアクセスする
getElementById()を使用して、<legend>要素にアクセスできます。
例
var x = document.getElementById("myLegend");
凡例オブジェクトを作成する
document.createElement()メソッドを使用して、<legend>要素を作成できます。
例
var x = document.createElement("LEGEND");
凡例オブジェクトのプロパティ
Property | Description |
---|---|
form | Returns a reference to the form that contains the legend |
標準のプロパティとイベント
Legendオブジェクトは、標準のプロパティとイベントもサポートしています。
関連ページ
HTMLリファレンス:HTML <fieldset>タグ
HTMLリファレンス:HTML <legend>タグ