Validator causes improper behavior for double click check

前端 未结 1 830
深忆病人
深忆病人 2020-12-22 08:08

I have following script to prevent a button from submitting twice by double clicking. It works fine.

But the scenario gets clumsy when I added a R

相关标签:
1条回答
  • 2020-12-22 08:31

    I think somthin like this:

     $('.myButton').click(function (e) {
            if(Page_IsValid){
            if (isActionInProgress == 'No') {
                isActionInProgress = 'Yes';
            }
            else {
                e.preventDefault();
                //alert('STOP');
            }
          }
    
        });
    
    0 讨论(0)
提交回复
热议问题