How to disable submit button once it has been clicked?

后端 未结 18 1564
轻奢々
轻奢々 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:37

    Another solution i´ve used is to move the button instead of disabling it. In that case you don´t have those "disable" problems. Finally what you really want is people not to press twice, if the button is not there they can´t do it.

    You may also replace it with another button.

提交回复
热议问题