如何在多次点击提交后仅提交一次表格? [英] How to submit form only once after multiple clicking on submit?
本文介绍了如何在多次点击提交后仅提交一次表格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有问题,当我尝试通过点击提交按钮提交表单时,需要一些时间来发布请求,如果我再次点击提交按钮,它将再次发送所有参数和参数保存两次,三次....等等。
I am having problem that when i am trying to submit the form by clicking on the submit button it takes some time to post request during this if i am again click on the Submit button it will again send the all parameters and parametrs get saved twice, thrice ....so on.
我不知道如何限制提交按钮,以免表单提交两次。
我想当我坚持提交我必须禁用提交按钮,以便用户不能再次点击它,这是正确的做法吗?
I don't know how to limit the the submit button so that form shouldn't get submitted twice. I think when i cliked on submit i have to disable submit button so that user can't click it again, is it right approach to doing this?
推荐答案
<input type="submit" onclick="this.disabled = true" value="Save"/>
这篇关于如何在多次点击提交后仅提交一次表格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文