
##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 attributesFormat
<keygen name="名称" />或<keygen name="名称" >
Copy after login
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>
Copy after login
Running result

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!