X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY ANGULAR XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

Keygen name Property

Keygen Object Reference Keygen Object

Example

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

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

The result of x will be:

security

Try it yourself »


Definition and Usage

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

The name attribute specifies the name of the keygen field, and is used to reference form-data after it has been submitted, or to reference the element in a 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.


Syntax

Return the name property:

keygenObject.name

Set the name property:

keygenObject.name=name

Property 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 value of the name attribute of a keygen field:

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

Try it yourself »


Related Pages

HTML reference: HTML <keygen> name attribute


Keygen Object Reference Keygen Object

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates FREE Website Templates Free HTML Templates

SHARE THIS PAGE

facebook