YouTip LogoYouTip

Prop Fieldset Name

HTML DOM Fieldset name Property

HTML DOM Fieldset name Property

-- Learning is not just about technology, but also about dreams!

JavaScript Reference Manual

Overview

JavaScript Objects

JavaScript Array Object JavaScript Boolean Object JavaScript Date Object JavaScript Math Object JavaScript Number Object JavaScript String Object JavaScript RegExp Object JavaScript Global Properties/Functions JavaScript Operators JavaScript Error

Browser Objects

Window Object Navigator Object Screen Object History Object Location Object Storage Object

DOM Objects

HTML DOM Document Object HTML DOM Element Object HTML DOM Attribute Object HTML DOM Event Object HTML DOM Console Object CSSStyleDeclaration Object DOM HTMLCollection

HTML Objects

<a> <area> <audio> <base> <blockquote> <body> <button> <canvas> <col> <colgroup> <datalist> <del> <details> <dialog> <embed> <fieldset> <form> <iframe> <frameset > <img> <ins> <input> - button <input> - checkbox <input> - color <input> - date <input> - datetime <input> - datetime-local <input> - email <input> - file <input> - hidden <input> - image <input> - month <input> - number <input> - range <input> - password <input> - radio <input> - reset <input> - search <input> - submit <input> - text <input> - time <input> - url <input> - week <keygen> <link> <label> <legend> <li> <map> <menu> <menuItem> <meta> <meter> <object> <ol> <optgroup> <option> <param> <progress> <q> <script> <select> <source> <style> <table> <td> <th> <tr> <textarea> <title> <time> <track> <video>

HTML DOM Fieldset form Property

HTML DOM Fieldset type Property

Explore Further

  • Web Services
  • Programming Languages
  • Programming
  • Web Design & Development
  • Web Service
  • Computer Science
  • Development Tools
  • Software
  • Scripting
  • Scripting Languages

Fieldset name Property

Fieldset Object Reference Manual Fieldset Object

Example

Return the value of the fieldset's name attribute:

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

x output result is:

personalia

Try it yourself Β»


Definition and Usage

The name property sets or returns the value of the name attribute of a fieldset.

The name attribute is used to reference form data after a form is submitted, or to reference the element in JavaScript.

Note: Only form elements with a name attribute will have their values passed when submitting a form.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The name property is supported in all major browsers except Internet Explorer and Safari.

Note: The name property is not supported in Opera 12 and earlier versions.


Syntax

Return the name property:

fieldsetObject.name

Set the name property:

fieldsetObject.name=name

Property Values

Value Description
name Specifies the name of the fieldset.

Technical Details

Return Value: A string, representing the name of the fieldset.

More Examples

Example

Change the value of the name attribute of a fieldset:

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

Try it yourself Β»


Related Articles

HTML Reference: HTML <fieldset> name Attribute


Fieldset Object Reference Manual Fieldset Object

← Prop Fieldset TypeProp Fieldset Form β†’