THE WORLD'S LARGEST WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

HTML DOM Keygen Object


Keygen Object

The Keygen Object is new in HTML5.

The Keygen object represents an HTML <keygen> element.

Note: The <keygen> element is not supported in Internet Explorer.

Access a Keygen Object

You can access a <keygen> element by using getElementById():

var x = document.getElementById("myKeygen"); Try it

Create a Keygen Object

You can create a <keygen> element by using the document.createElement() method:

var x = document.createElement("KEYGEN"); Try it

Keygen Object Properties

Property Description
autofocus Sets or returns whether a keygen field automatically gets focus when the page loads, or not
challenge Sets or returns the value of the challenge attribute of a keygen field
disabled Sets or returns whether a keygen field is disabled, or not
form Returns a reference to the form that contains the keygen field
keytype Sets or returns the value of the keytype attribute of a keygen field
name Sets or returns the value of the name attribute of a keygen field
type Returns which type of form element the keygen field is

Standard Properties and Events

The Keygen object also supports the standard properties and events.


Related Pages

HTML tutorial: HTML Forms

HTML reference: HTML <keygen> tag