Disable the submit button after clicking and enable it back again after a few seconds

后端 未结 6 675
你的背包
你的背包 2020-12-31 00:47

I\'m using jquery $.post when submitting a form. I want to disable the button for like 5 seconds after it has been clicked to avoid multiple submission of the form.

6条回答
  •  旧巷少年郎
    2020-12-31 01:04

    Just place this in your JS for the page the submit button is on

    
    

    Code source

提交回复
热议问题