How to disable a submit button after submission in PHP?

前端 未结 8 2173
耶瑟儿~
耶瑟儿~ 2021-01-27 08:21

I browsed through the other questions on this issue but couldn\'t find a satisfactory answer. I have a quiz website where the user selects an option from four options and then c

8条回答
  •  天命终不由人
    2021-01-27 08:27

    For disable write like this, after once click it will be disable.

    
    
    
        $("#but_sub").click(function() {
            $(this).attr("disabled",true);
        }
    

    or

        $('#but_sub').click(function() {
            $(this).attr("disabled","disabled");
        }
    

提交回复
热议问题