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

Keygen name property

Keygen name property

Keygen Object Reference Keygen Object

Example

Return the value of the name attribute of the keygen field:

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

x Output result:

security

Try it »


Definition and Usage

The name property sets or returns the value of the name attribute of the keygen field.

The name property describes the value of the name attribute of the keygen field, used to reference the data after the form data is submitted, or to reference it in JavaScript scripts.

Note: Only by using the name attribute in a form element can the data be passed to the backend server when the form is submitted.


Browser support

Internet Explorer Firefox Opera Google Chrome Safari

All major browsers support the disabled property, except Internet Explorer.


Syntax

Return the name attribute:

keygenObject

.name

Set the name attribute:

keygenObject

.name=

name

Attribute values

Value Description
name Describes the name of the keygen field.

Technical description

Return value: String, representing the name of the keygen field.

More examples

Example

Modify the value of the name attribute of the keygen field:

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

Try it »


Related pages

HTML Reference Manual: HTML name attribute


Keygen Object Reference Keygen Object