编辑下面的代码:【加编码】
<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>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂