<fieldset>
HTML DOM Fieldset object
Fieldset object
A Fieldset object represents an HTML <fieldset> element.
Access Fieldset objects
You can use getElementById() to access the <fieldset> element:
var x = document.getElementById("myFieldset");
Tip: You can also access Fieldset objects by searching the form's elements collection.
Create Fieldset object
You can use the document.createElement() method to create <fieldset> elements:
var x = document.createElement("myFieldset");
Fieldset object properties
Attribute added in HTML5.
Attribute | Description |
---|---|
disabled![]() | Sets or returns whether fieldset is disabled. |
form![]() | Returns a reference to a form that contains fieldsets. |
name![]() | Sets or returns the value of the name property of the fieldset. |
type | Returns which type of form element fieldset is. |
Standard Properties and Events
Fieldset objects also support standard properties and events .
Related articles
HTML Tutorial: HTML Forms
HTML Reference Manual: HTML <fieldset> Tag