YouTip LogoYouTip

Dom Obj Fieldset

HTML DOM Fieldset Object

Fieldset Object

The Fieldset object represents an HTML <fieldset> element.

Accessing the Fieldset Object

You can use getElementById() to access the <fieldset> element:

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

Try it

Tip: You can also access the Fieldset object by searching the form's elements collection.

Creating a Fieldset Object

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

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

Try it

Fieldset Object Properties

= New in HTML5.

Property 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 which type of form element the fieldset is.

Standard Properties and Events

The Fieldset object also supports standard properties and events.


Related Articles

← Prop Fieldset DisabledProp Embed Width β†’