keygen is a new tag in html5. The keygen tag specifies the key pair generator field for the form, with the syntax "
"; when the form is submitted, the private key will be stored locally, and the public key will be sent to the server.
The operating environment of this tutorial: Windows 7 system, HTML5 version, Dell G3 computer.
keygen is a new tag in html5.
HTML5
When the form is submitted, the private key is stored locally and the public key is sent to the server.
Syntax:
<keygen 属性名="属性值">
Attribute | Value | Description |
---|---|---|
autofocus | autofocus | Causes the |
challenge | challenge | If used, sets the value of keygen to ask on commit. |
disabled | disabled | Disables the |
form | form_id | Define one or more forms to which this |
keytype | rsa dsa ec | defines the security algorithm of the key. |
name | ##name | Define the unique name of the
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> </head> <body> <form action="demo_keygen.php" method="get"> 用户名: <input type="text" name="usr_name"> 加密: <keygen name="security"> <input type="submit"> </form> </body> </html>
##[Related recommendations:
html video tutorialThe above is the detailed content of Is keygen a new tag in html5?. For more information, please follow other related articles on the PHP Chinese website!