"; when the form is submitted, the private key will be stored locally, and the public key will be sent to the server."/> "; when the form is submitted, the private key will be stored locally, and the public key will be sent to the server.">

Home >Web Front-end >Front-end Q&A >Is keygen a new tag in html5?

Is keygen a new tag in html5?

青灯夜游
青灯夜游Original
2022-03-03 13:57:292400browse

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.

Is keygen a new tag in html5?

The operating environment of this tutorial: Windows 7 system, HTML5 version, Dell G3 computer.

keygen is a new tag in html5.

HTML5 Tag

The tag specifies the key pair generator field to be used in the form.

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

Syntax:

<keygen 属性名="属性值">
Define the unique name of the element. The name attribute is used to collect the value of the field when submitting the form.
Attribute Value Description
autofocus autofocus Causes the field to gain focus when the page loads.
challenge challenge If used, sets the value of keygen to ask on commit.
disabled disabled Disables the element field.
form form_id Define one or more forms to which this field belongs.
keytype rsa
dsa
ec
defines the security algorithm of the key.
name


##name

Example:


<!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>

Is keygen a new tag in html5?##[Related recommendations:

html video tutorial

, web front end

The 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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn