Fieldset name property

HTML DOM Fieldset name property Fieldset object

Returns the value of fieldset's name property:

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

x The output is:

personalia

Try it out . . .

Definitions and usages

The name property sets or returns the value of fieldset's name property.

The name property is used to reference form data after the form is submitted, or to reference elements in JavaScript.

Note: Only form elements with the name property pass their values when the form is submitted.


Browser support

HTML DOM Fieldset name property HTML DOM Fieldset name property HTML DOM Fieldset name property HTML DOM Fieldset name property HTML DOM Fieldset name property

In addition to Internet Explorer and Safari, the name property is supported by all major browsers.

Note: Opera 12 and its previous versions do not support the name property.


Grammar

Returns the name property:

fieldsetObject .name

Set the name property:

fieldsetObject .name= name

The property value

value describe
name Specify the name of the fieldset.

Technical details

Return value: A string that represents the name of fieldset.


More instances

Change the value of fieldset's name property:

document.getElementById("myFieldset").name="newName";

Try it out . . .


Related articles

HTML Reference Manual: HTML slt;fieldset&name properties


HTML DOM Fieldset name property Fieldset object