How to disable submit button once it has been clicked?

后端 未结 18 1501
轻奢々
轻奢々 2020-12-01 05:06

I have a submit button at the end of the form.

I have added the following condition to the submit button:

onClick=\"this.disabled=true;
this.value=\'         


        
18条回答
  •  不思量自难忘°
    2020-12-01 05:39

    In my case this was needed.

    Disable submit button on form submit

    It works fine in Internet Explorer and Firefox without it, but it did not work in Google Chrome.

    The problem is that you are disabling the button before it can actually trigger the submit event.

提交回复
热议问题