<html>
<body>
<form action="demo_keygen.php" method="get">
Username: <input type="text" name="usr_name">
Encryption: <keygen id="myKeygen" name="security">
<input type="submit">
</keygen></form>
<p>点击 "点我" 按钮禁用 keygen 字段。</p>
<button onclick="myFunction()">点我</button>
<script>
function myFunction()
{
document.getElementById("myKeygen").disabled=true;
}
</script>
</body>
</html>