ASP.NET MVC - How to prevent double click submit with jquery.validate.unobtrusive lib?

后端 未结 9 1181
伪装坚强ぢ
伪装坚强ぢ 2020-12-29 07:47

I need to avoid the double click submitting behavior. I\'m using the client validation with the unobtrusive library. I have the following code for avoiding the double clic:<

9条回答
  •  余生分开走
    2020-12-29 08:22

     $('form').submit(function () {
     $('input[type="submit"]', this).attr('disabled', 'disabled');
       });
    

提交回复
热议问题