源代码
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>编程字典</title> </head> <body> <form action="demo_keygen.php" method="get"> Username: <input type="text" name="usr_name"> Encryption: <keygen name="security" autofocus> <input type="submit"> </form> <p><strong>注意:</strong> IE不支持 keygen标签.</p> <p><strong>Note:</strong>Firefox不支持keygen标签的 autofocus 属性.</p> </body> </html>
运行结果