HTMLDOMフィールドセットオブジェクト
フィールドセットオブジェクト
Fieldsetオブジェクトは、HTMLの<fieldset>要素を表します。
フィールドセットオブジェクトにアクセスする
getElementById()を使用して、<fieldset>要素にアクセスできます。
例
var x = document.getElementById("myFieldset");
ヒント:フォームの要素コレクションを検索して、Fieldsetオブジェクトにアクセスすることもできます。
フィールドセットオブジェクトを作成する
document.createElement()メソッドを使用して、<fieldset>要素を作成できます。
例
var x = document.createElement("FIELDSET");
フィールドセットオブジェクトのプロパティ
Property | Description |
---|---|
disabled | Sets or returns whether a fieldset is disabled, or not |
form | Returns a reference to the form that contains the fieldset |
name | Sets or returns the value of the name attribute of a fieldset |
type | Returns which type of form element the fieldset is |
標準のプロパティとイベント
Fieldsetオブジェクトは、標準のプロパティとイベントもサポートしています。
関連ページ
HTMLチュートリアル:HTMLフォーム
HTMLリファレンス:HTML <fieldset>タグ