Disable button on form submission

前端 未结 17 1674
伪装坚强ぢ
伪装坚强ぢ 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:52

    This is an easier but similar method than what rp has suggested:

    function submit(button) {
            Page_ClientValidate(); 
            if(Page_IsValid)
            {
                button.disabled = true;
            }
    }
    
     
    

提交回复
热议问题