fieldset 要素は <fieldset> の整形や操作の為の特別なメソッドやプロパティを持つ HTMLFieldsetElement インタフェース (HTML5 HTMLFieldSetElement / HTML 4 HTMLFieldSetElement) を公開します。これは通常の HTMLElement オブジェクトインタフェースからも継承により利用可能です。
HTMLElement から継承するもの以外に、幾つかの固有のメソッドとプロパティを持ちます。
プロパティ
以下に列挙するプロパティ内、 form プロパティ以外は全て HTML5 で新たに定義されたものです。
| 名称 |
型 |
説明 |
disabled |
Boolean |
disabled HTML 属性を反映。ユーザがフォームコントロールと対話可能であるか否かを示す。 |
elements 読取専用 |
HTMLFormControlsCollection |
このフィールドセットに属する要素 |
form 読取専用 |
HTMLFormElement |
要素が form 要素の子孫である場合は、その form 要素を示す。 if this element is in a form. Otherwise, the element the name content attribute points to HTML5. (null in HTML 4.) |
name |
DOMString |
fieldset 要素の name 属性を反映。 フォーム送信に用いられるフィールドセットの名称。 |
type 読取専用 |
DOMString |
文字列 "fieldset" を値として持ちます。 |
validationMessage 読取専用 |
DOMString |
A localized message that describes the validation constraints that the element does not satisfy (if any). This is the empty string if the element is not a candidate for constraint validation (willValidate is false), or it satisfies its constraints. |
validity 読取専用 |
ValidityState |
The validity states that this element is in. |
willValidate |
boolean |
Always false because fieldset objects are never candidates for constraint validation. |
メソッド
| 名称 / 引数 |
戻り値 |
説明 |
checkValidity() |
Boolean |
Always returns true because fieldset objects are never candidates for constraint validation. |
setCustomValidity(in DOMString error) |
void |
Sets a custom validity message for the field set. If this message is not the empty string, then the field set is suffering from a custom validity error, and does not validate. |
仕様
ブラウザ実装状況
| 機能 |
Chrome |
Firefox (Gecko) |
Internet Explorer |
Opera |
Safari (WebKit) |
| 基本サポート |
(有) |
1.0 (1.7 or earlier) |
(有) |
(有) |
(有) |
| 機能 |
Android |
Firefox Mobile (Gecko) |
IE Phone |
Opera Mobile |
Safari Mobile |
| 基本サポート |
(有) |
1.0 (1.0) |
(有) |
(有) |
(有) |
関連情報
<fieldset> 要素 - HTMLFieldsetElement インタフェースを持つ HTML 要素
Document Tags and Contributors