Posts in current category

HTML5 <keygen> tag (abandoned)


May 03, 2021 16:00 HTML5


Table of contents


The label generates a public and private key, which is stored locally by the user, and the public key is sent to the server. The label is obsolete in the new web standard!

Form with keygen field:

<form action="demo_keygen.asp" method="get">
 用户名: <input type="text" name="usr_name">
 加密: <keygen name="security">
 <input type="submit">
</form>
Try it out . . .

Browser support

HTML5 <keygen> tag (abandoned) HTML5 <keygen> tag (abandoned) HTML5 <keygen> tag (abandoned) HTML5 <keygen> tag (abandoned) HTML5 <keygen> tag (abandoned)

Firefox, Opera, Chrome, and Safari 6 all support the hashtag.


Label definition and instructions for use

The label specifies the key pair generator field used for the form.

When the form is submitted, the private key is stored locally and the public key is sent to the server.


The difference between HTML 4.01 and HTML5

The element is a new HTML5 label.


Property

New: HTML5 new property.

Property Value Describe
autofocus New autofocus Gives the field focus when the page loads.
challenge New challenge If used, the value of keygen is set to be asked at commit time.
disabled New disabled Disable the element field.
form New form_id Define one or more forms to which the field belongs.
keytype New Rsa
Dsa
ec
The security algorithm that defines the key.
name New name Defines the unique name of the element. The name property is used to collect the value of a field when the form is submitted.

Global properties

The label supports global properties and views the full property sheet HTML global properties .


The event property

The label supports all HTML event properties .