Keygen nameProperties
Example
Return the value of the name attribute of the keygen field:
var x = document.getElementById("myKeygen").name;
xOutput:
security
Try it Yourself »
Definition and Usage
The name attribute is used to set or return the value of the name attribute of the keygen field.
The name attribute describes the value of the name attribute of the keygen field, and is used to reference the data after the form data has been submitted, or in JavaScript scripts.
Note:Only when the name attribute is used on form elements can the data be passed to the backend server when the form is submitted.
Browser Support
![]()
All major browsers support the disabled attribute, except Internet Explorer.
Syntax
Return the name property:
keygenObject.name
Set the name property:
keygenObject.name=name
Attribute Values
| Value | Description |
|---|---|
| name | Specifies the name of the keygen field. |
Technical Details
| Return Value: | A string representing the name of the keygen field. |
|---|
More Examples
Example
Change the name attribute value of the keygen field:
document.getElementById("myKeygen").name="newName";
Try it Yourself »
Related Pages
HTML Reference:HTML <keygen> name Attribute
Other Extensions
Keygen Object