Preventing multiple clicks on button

后端 未结 14 1990
小鲜肉
小鲜肉 2020-12-02 09:43

I have following jQuery code to prevent double clicking a button. It works fine. I am using Page_ClientValidate() to ensure that the double click is prevented o

14条回答
  •  天涯浪人
    2020-12-02 10:31

    We can use on and off click for preventing Multiple clicks. i tried it to my application and it's working as expected.

    $(document).ready(function () {     
        $("#disable").on('click', function () {
            $(this).off('click'); 
            // enter code here
        });
    })
    

提交回复
热议问题