Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Fieldset type property

Fieldset type property

Fieldset Object Reference Fieldset Object

Example

Return which type of form element the fieldset is:

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

x The output is:

fieldset

Try it »


Definition and Usage

The type property returns which type of form element the fieldset is.

For a fieldset, this property always returns "fieldset".

**Note:** This property is read-only.


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Except for Internet Explorer and Safari, all other major browsers support the type property.

**Note:** Opera 12 and earlier versions do not support the type property.


Syntax

fieldsetObject

.type

Technical Details

Return Value: String, representing the type of the fieldset form element.

Fieldset Object Reference Fieldset Object