Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

HTML DOM Fieldset object


May 06, 2021 JavaScript with HTML DOM Reference book


Table of contents


HTML DOM Fieldset object


Fieldset object

The Fieldset object represents an HTML-lt;fieldset-gt; element.

Access fieldset objects

You can use getElementById() to access the elements of the .lt;fieldset:

varx = document.getElementById("myFieldset"); try it

Tip: You can also access Fieldset objects by searching the elements collection of forms.

Create a Fieldset object

You can use the document.createElement() method to create the element of the .lt;fieldset:

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

Fieldset object properties

New properties in HTML5.

Attributes describe
disabled Set or return to whether the fieldset is disabled.
form Returns a reference to a form that contains FieldSet.
name Set or returns the value of the Name property of the fieldset.
type Returns which type of form elements are Fieldset.

Standard properties and events

Fieldset objects also support standard properties and events.


Related articles

HTML tutorial: HTML forms

HTML Reference Manual: HTML .lt;fieldset.gt; Tags