拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...
Add this line to the form
<input type="hidden" name="token" value="随机字符串">
Then the server will make a judgment and just ignore the duplicate value. Very original method
Thank you for the invitation. There are roughly two ways to prevent submissions
1. 服务端生成一个token放在页面中,提交当前页面时验证这个token,这也是防csrf的一个方法哦 2.正如前面各位同学说的在前端做处理,加一个类似disable就是禁止的那一堆玩意儿,ajax的话可以写在beforsend这里
Add this line to the form
Then the server will make a judgment and just ignore the duplicate value.
Very original method
Thank you for the invitation. There are roughly two ways to prevent submissions