怪我咯2017-04-18 10:07:45
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
巴扎黑2017-04-18 10:07:45
Thank you for the invitation. There are roughly two ways to prevent submissions
1. 服务端生成一个token放在页面中,提交当前页面时验证这个token,这也是防csrf的一个方法哦
2.正如前面各位同学说的在前端做处理,加一个类似disable就是禁止的那一堆玩意儿,ajax的话可以写在beforsend这里