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

Is keygen a new tag in html5?

青灯夜游
Release: 2022-03-03 13:57:29
Original
2399 people have browsed it

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 属性名="属性值">
Copy after login
Define the unique name of the element. The name attribute is used to collect the value of the field when submitting the form.
AttributeValueDescription
autofocusautofocus Causes the field to gain focus when the page loads.
challengechallenge If used, sets the value of keygen to ask on commit.
disableddisabledDisables the element field.
formform_idDefine one or more forms to which this field belongs.
keytypersa
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>
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template