English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
How to use the HTML keygen form attribute, browser compatibility, syntax definition, and detailed information about its attribute values, etc. are demonstrated in online examples.
The <keygen> element located outside the form (but still part of the form):
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>HTML <keygen> form Attribute Usage-基础教程(oldtoolbag.com)</title> </head> <body> <form action="demo-frame.php" method="get" id="secureform"> Username: <input type="text" name="usr_name"> <input type="submit"> </form> <p>The registration machine field is outside the form, but it still belongs to part of the form./p> Encryption: <keygen name="security" form="secureform"> <p><strong>Attention:</strong> IE browser does not support keygen tag.</p> </body> </html>Test it out ‹/›
IEFirefoxOperaChromeSafari
Firefox, Opera, Chrome, and Safari 6 Supports the form attribute of the <keygen> tag.
The form attribute of the <keygen> tag specifies one or more forms that the <keygen> element belongs to.
<keygen> tag is an HTML5 of the new tag in.
<keygen form="form_id">
Value | Description |
---|---|
form_id | Specify a list of one or more forms that the <keygen> element belongs to, separated by spaces. |