HTML DOM Fieldset Object

Fieldset object

The Fieldset object represents the HTML <fieldset> element.

Accessing the Fieldset object

You can access the <fieldset> element by using getElementById():

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

Try it yourself

Tip:You can also traverse the form's elements collection to access the Fieldset object.

Creating a Fieldset object

You can create a <fieldset> element by using the document.createElement() method:

var x = document.createElement("FIELDSET");

Try it yourself

Fieldset object properties

Properties Description
disabled Sets or returns whether the fieldset is disabled.
form Returns a reference to the form that contains the fieldset.
name Sets or returns the value of the name attribute of the fieldset.
type Returns the form element type of the fieldset.

Standard properties and events

The Fieldset object supports standardsPropertiesAndEvents.

Related Pages

HTML Tutorial:HTML Forms

HTML Reference Manual:HTML <fieldset> Tag