You are here: Reference > JavaScript > client-side > HTML DOM > objects > nodes and tags > keygen

keygen object

Browser support:
Allows a form to be submitted with key encryption. The element generates a secure key and submits the public key with the form.
A selection list belongs to the keygen tag. The user can choose the type of the RSA key pair generation ('medium grade', 'high grade') with this selection list.
This tag is deprecated, do not use it.

Syntax:

Methods that return the object:
document.createElement ("keygen")
The base interface, through which you can add new functionalities to the keygen object, is the HTMLSelectElement interface.
If you want to see the HTML objects by categories, please visit this page.
HTML page for this element: keygen

Possible members:

Properties
Methods
Events
Style properties
accessKey
Sets or retrieves an access key to an element.
all
Represents a collection of all elements contained by an element or the entire document.
attributes
Represents a collection of attribute nodes that belong to an element.
baseURI
10
Returns the base URL for the object.
childElementCount
3.5
Returns the number of element nodes that are direct descendants of the current element.
childNodes
Represents a collection of all nodes that are direct descendants of an element.
children
3.5
Represents a collection of all element nodes that are direct descendants of an element.
className
Sets or retrieves the style class or classes that belong to the element.
clientHeight
Returns the height of the visible area for an object, in pixels. The value contains the height with the padding, but it does not include the scrollBar, border, and the margin.
clientLeft
Returns the width of the left border in pixels.
clientTop
Returns the height of the top border in pixels.
clientWidth
Returns the width of the visible area for an object, in pixels. The value contains the width with the padding, but does not include the scrollBar, border, and the margin.
contentEditable
3
Sets or retrieves whether the contents of the object are editable.
currentStyle
Represents the computed style settings for an element.
dir
Sets or retrieves the text direction as related to the lang property.
disabled
Sets or retrieves the state of an object for user interaction.
firstChild
Returns a reference to the first child of the current element.
firstElementChild
3.5
Returns a reference to the first child element of the current element.
form
Returns a reference to the form element in which the object is placed.
id
Sets or retrieves a unique identifier for the object.
innerHTML
Sets or retrieves the inner HTML content (the source code between the opening and closing tags) of an element.
innerText
Sets or returns the text content of an element including the text content of its descendants.
isContentEditable
Returns a Boolean value that indicates whether the contents of the object are editable by the user.
lang
Specifies or returns the language of the element.
lastChild
Returns a reference to the last child of the current element.
lastElementChild
3.5
Returns a reference to the last child element of the current element.
length
Returns the number of form controls in a form element or the number of options in a select or keygen element.
localName
Returns the local part of the qualified name of the current node.
multiple
Sets or retrieves whether more than one item from a list can be selected.
name
Sets or retrieves the name of a form control that affects the contents of the message submitted to the server.
namespaceURI
3.6
Sets or returns the namespace URI of the current node.
nextElementSibling
3.5
Returns a reference to the next child element of the current element's parent.
nextSibling
Returns a reference to the next child of the current element's parent.
nodeName
Returns the name of the current node.
nodeType
Returns an integer that indicates the type of the node.
nodeValue
Sets or returns the value of the current node.
offsetHeight
Returns the height of the visible area for an object, in pixels. The value contains the height with the padding, scrollBar, and the border, but does not include the margin.
offsetLeft
Returns the left position of an object relative to the left side of its offsetParent element, in pixels.
offsetParent
Returns a reference to the closest ancestor element in the DOM hierarchy from which the position of the current element is calculated.
offsetTop
Returns the top position of the object relative to the top side of its offsetParent element, in pixels.
offsetWidth
Returns the width of the visible area for an object, in pixels. The value contains the width with the padding, scrollBar, and the border, but does not include the margin.
options
Represents a collection of all option elements in a select element.
outerHTML
Sets or retrieves the outer HTML content (the source code including the opening and closing tags) of an element.
outerText
Sets or returns the text content of an element including the text content of its descendants.
ownerDocument
Returns the document object that contains the current node.
parentElement
Returns the parent element of the object in the DOM hierarchy.
parentNode
Returns the parent element of the current node in the DOM hierarchy.
previousElementSibling
3.5
Returns a reference to the previous child element of the current element's parent.
previousSibling
Returns a reference to the previous node of the current element's parent.
scrollHeight
Returns the total height of an element's contents, in pixels. The value contains the height with the padding, but does not include the scrollBar, border, and the margin.
scrollLeft
Sets or retrieves the number of pixels by which the contents of an object are scrolled to the left.
scrollTop
Sets or retrieves the number of pixels by which the contents of an object are scrolled upward.
scrollWidth
Returns the total width of an element's contents, in pixels. The value contains the width with the padding, but does not include the scrollBar, border, and the margin.
selectedIndex
Specifies or returns the zero-based index of the selected option in a select object or in the selection list of a keygen object.
size
Specifies or returns the count of the visible option items in a selection list. The selection list can be a select element or the selection list of a keygen element.
sourceIndex
Returns the position of the current object in the all collection of the document.
style
Represents the inline style settings for an element or a CSS rule.
tabIndex
Specifies or returns the tabbing order for keyboard navigation using the TAB key.
tagName
Returns the tag name of the current element.
textContent
Sets or returns the text content of an element including the text content of its descendants.
title
Specifies or returns a tooltip for an element.
type
Returns a string that identifies whether more than one item can be selected in a selection list.
value
Specifies or returns the value of an option or a select element.

Example HTML code 1:

This example illustrates the use of the keygen element:
<form method="post" action="#URL#" enctype="application/x-www-form-urlencoded">
    <keygen name="key" challenge="1125983021" />
    <input type="text" name="textToCode" value="Some Text" />
    <br />
    <input type="submit" value="Send" />
</form>
Did you find this example helpful? yes no

External links:

User Contributed Comments

Post Content

Post Content