How to disable a submit button after submission in PHP?

前端 未结 8 2096
耶瑟儿~
耶瑟儿~ 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条回答
  •  旧时难觅i
    2021-01-27 08:31

    Just try with below code. I hope it will help you...

        $('#contact-form').submit(function () {
            if ($(this).valid()) {
                $('.submit').attr("disabled", true);
            }
        });
    

提交回复
热议问题