Наши волонтёры ещё не перевели данную статью на Русский. Присоединяйтесь к нам и помогите сделать эту работу!
Вы можете также прочитать эту статью на English (US).

The HTMLFieldSetElement interface has special properties and methods (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of field-set elements.


Inherits properties from its parent, HTMLElement.

A Boolean reflecting the disabled HTML attribute, indicating whether the user can interact with the control.
HTMLFieldSetElement.elementsRead only
The elements belonging to this field set. The type of this property depends on the version of the spec that is implemented by the browser.
HTMLFieldSetElement.formRead only
An HTMLFormControlsCollection or HTMLCollection referencing the containing form element, if this element is in a form.
If the button is not a descendant of a form element, then the attribute can be the ID of any form element in the same document it is related to, or the null value if none matches.
A DOMString reflecting the name HTML attribute, containing the name of the field set, used for submitting the form.
HTMLFieldSetElement.typeRead only
The DOMString "fieldset".
DOMString representing 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.
A ValidityState representing the validity states that this element is in.
A Boolean false, because <fieldset> objects are never candidates for constraint validation.


Inherits methods from its parent, HTMLElement.

Always returns true because <fieldset> objects are never candidates for constraint validation.
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.


Specification Status Comment
HTML Living Standard
The definition of 'HTMLFieldSetElement' in that specification.
Living Standard No change from HTML5.
HTML 5.1
The definition of 'HTMLFieldSetElement' in that specification.
The definition of 'HTMLFieldSetElement' in that specification.
Recommendation The following properties have been added: disabled, elements, name, type, valdiationMessage, validity, and willValidate.
The following methods have been added: checkValidity(), setCustomValidity().
Document Object Model (DOM) Level 2 HTML Specification
The definition of 'HTMLFieldSetElement' in that specification.
Obsolete No change
Document Object Model (DOM) Level 1 Specification
The definition of 'HTMLFieldSetElement' in that specification.
Obsolete Initial definition

Browser compatibility

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Feature Chrome Edge Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support (Yes) (Yes) 1.0 (1.7 or earlier) (Yes)[1] (Yes) (Yes)
Change type of elements property to HTMLCollection 57 ? ? ? 44 ?
Feature Android Webview Chrome for Android Edge Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support (Yes) (Yes) (Yes) 1.0 (1.0) (Yes) (Yes) (Yes)
Change type of elements property to HTMLCollection 57 57 ? ? ? 44 ?

[1] IE 11 does not seem to support the elements property on HTMLFieldSetElement

See also

  • The HTML element implementing this interface: <fieldset>.

Метки документа и участники

 Внесли вклад в эту страницу: Sebastianz, jakubfiala, jpmedley, danielnixon, erikadoyle, Manuel_Strehl, teoli, markg, Nexii, MHasan, kscarfone, Sheppy, ethertank, Ms2ger, jswisher
 Обновлялась последний раз: Sebastianz,