Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Fieldset form property

Fieldset form property

Fieldset Object Reference Fieldset Object

Example

Return the form containing

The id of the form containing the element:

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

x The output is:

myForm

Try it »


Definition and Usage

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

If successful, this property returns a form object.

**Note:** This property is read-only.


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the form attribute.


Syntax

fieldsetObject

.form

Technical Details

Return Value: A reference to the form containing the fieldset. If the fieldset is not inside a form, returns null.

Fieldset Object Reference Fieldset Object