fmpq.com
源代码:
点击运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Fmpq教程(fmpq.com)</title> </head> <body> <form action="demo_keygen.php" method="get"> 用户名: <input type="text" name="usr_name"> 加密: <keygen id="myKeygen" name="security"> <input type="submit"> </form> <p>点击按钮显示或者修改keygen字段的 name 属性值。</p> <button onclick="display()">显示 name 属性值</button> <button onclick="change()">修改 name 属性值</button> <script> function display(){ var x = document.getElementById("myKeygen").name; alert("keygen 字段的名称为: " + x); } function change(){ var x = document.getElementById("myKeygen").name="newName"; alert ("名称被修改为: " + x); } </script> </body> </html>
运行结果