html5<keygen> tag


  Translation results:

key

UK[ki:] 美[ki]

n.Key; (typewriter, etc.) key; key, clue, secret ; (of music) key

vt. Type; lock; adjust the tone of; provide clues

vi. Use a key

adj.Key; main

gen

英[dʒen] 美[dʒen]

n.<英译>Intelligence

html5<keygen> tagsyntax

Function: The <keygen> tag 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.

Parameters:

Attributes
ValueDescription
autofocusautofocus Causes the keygen field to gain focus when the page loads.
challengechallenge If used, sets the value of keygen to ask on commit.
disableddisabledDisable keytag field.
formformnameDefine one or more forms to which this keygen field belongs.
keytypersaDefine keytype. rsa generates RSA keys.
namefieldname Defines the unique name of the keygen element.

The name attribute is used to collect the value of the field when submitting the form.

html5<keygen> tagexample

<!DOCTYPE HTML>
<html>
<body>

<form action="/example/html5/demo_form.asp" method="get">
用户名:<input type="text" name="usr_name" />
加密:<keygen name="security" />
<input type="submit" />
</form>

</body>
</html>
Run instance »

Click the "Run instance" button to view the online instance

Home

Videos

Q&A