Home  >  Article  >  Web Front-end  >  How to use html keygen tag

How to use html keygen tag

silencement
silencementOriginal
2019-05-27 11:45:153962browse

How to use html keygen tag

##In HTML, the tag is used to specify the key pair generator field of the form. When the form is submitted, the private key is stored locally and the public key is sent to the server. The tag is a new tag in HTML5. It is supported by Firefox, Opera, Chrome and Safari 6 browsers, but not by Internet Explorer browser. This tag has been abandoned in the new web standard.

html5 New attribute

autofocus: Make the field gain focus when the page loads (value: autofocus).

challenge: Set the value of to ask on submission (value: challenge).

disabled: Disable the element field (value: disabled).

form: Define one or more forms to which the field belongs (value: form_id).

keytype: Defines the security algorithm of the key (value: rsa/dsa/ec).

name: Defines the unique name of the element. (value: name).

tag supports html global attributes and html event attributes

Format


<keygen name="名称" />或<keygen name="名称" >

Example


<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>html< keygen> 标签笔记_PHP笔记</title>
</head>
<body>
<form action="#" method="get" />
用户名: <input type="text" name="user" /><br /><br />
加密: <keygen name="myKeygen" /><br /><br />
<input type="submit">
</form>
</body>
</html>

Running result


How to use html keygen tag

The above is the detailed content of How to use html keygen tag. 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