Fieldset form attribute

Definition and Usage

form The property returns a reference to the form containing the fieldset.

This property returns the form object on success.

Note:This property is read-only.

See also:

HTML Reference Manual:HTML <fieldset> form attribute

HTML Reference Manual:HTML <fieldset> tag

Example

Return the id of the form containing the <fieldset> element:

var x = document.getElementById("myFieldset").form.id;

Try it yourself

Syntax

fieldsetObject.form

Technical details

Return value: Reference to form elements containing fieldset. If the fieldset is not in the form, then null is returned.

Browser support

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Support Support Support Support Support