Latest web development tutorials
 

HTML DOM Fieldset Object


Fieldset Object

The Fieldset object represents an HTML <fieldset> element.

Access a Fieldset Object

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

Example

var x = document.getElementById("myFieldset");
Try it Yourself »

Tip: You can also access a Fieldset object by searching through the elements collection of a form.

Create a Fieldset Object

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

Example

var x = document.createElement("FIELDSET");
Try it Yourself »

Fieldset Object Properties

= Property added in HTML5.

Property Description
disabled Sets or returns whether a fieldset is disabled, or not
form Returns a reference to the form that contains the fieldset
name Sets or returns the value of the name attribute of a fieldset
type Returns which type of form element the fieldset is

Standard Properties and Events

The Fieldset object also supports the standard properties and events.


Related Pages

HTML tutorial: HTML Forms

HTML reference: HTML <fieldset> tag