name attribute (input, select, textarea, ...)
Sets the name of a form control that affects the contents of the message submitted to the server.
- The name attribute is useful for submitting data to a server. The contents of the submitted message represent the state of the named form controls in a form tag.
- The name attribute has additional meaning for radio buttons. You can define groups with the name attribute of the radio buttons. Radio buttons with the same name belong to the same group. Radio buttons with different names belong to different groups. Within a group, only one radio button can be checked.
- The name attribute has effect on Autocomplete windows, too. You can enable the Autocomplete window for an input:password or an input:text element in a form with the autoComplete attribute. The contents of the Autocomplete window depend on the value of the name attribute. If you don't want to change the value of the name attribute because of the Autocomplete window, you can use the vCard_name attribute in Internet Explorer.
String that sets the name of the form control.
Default: this attribute has no default value.
Example HTML code 1:
This example illustrates the use of the name attribute for form elements:
Did you find this example helpful?
Supported by tags:
User Contributed Comments