Fieldset form property

HTML DOM Fieldset form property Fieldset object

Returns the id of the form that contains the elements of the .lt;fieldset:

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

x The output is:

myForm

Try it out . . .

Definitions and usages

The form property returns a reference to a form that contains fieldset.

If successful, the property returns a form object.

Note: This property is read-only.


Browser support

HTML DOM Fieldset form property HTML DOM Fieldset form property HTML DOM Fieldset form property HTML DOM Fieldset form property HTML DOM Fieldset form property

The form property is supported by all major browsers.


Grammar

fieldsetObject .form

Technical details

Return value: A reference to a form that contains fieldsets. If fieldset is not in the form, null is returned.


HTML DOM Fieldset form property Fieldset object