具体如下:
这里使用javascript控制表单提交后,提交按钮不可用,可以防止用户多次提交。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>表单提交后按钮禁用</title> <script type="text/javascript"> function sub() { document.forms[0].elements[0].disabled = true; document.forms[0].submit(); } </script> </head> <body> <form action="login.action" method="post"> <input type="button" name="btn" value="提交表单" onclick="return sub();" /> </form> </body> </html>