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");
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");
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
- HTML Tutorial: HTML Forms
- HTML Reference: HTML <fieldset> Tag
YouTip