Disable button on form submission

前端 未结 17 1689
伪装坚强ぢ
伪装坚强ぢ 2020-12-01 00:13

I have a button that I would like to disable when the form submits to prevent the user submitting multiple times.

I have tried naively disabling the button with java

17条回答
  •  情歌与酒
    2020-12-01 00:55

    I'm not a huge fan of writing all that javascript in the code-behind. Here is what my final solution looks like.

    Button:

    
    

    Javascript:

    
    

提交回复
热议问题