Jquery prevent multiple submit

后端 未结 7 830
花落未央
花落未央 2020-12-30 09:58

I want to prevent multiple submit if someone click on one of the submit buttons multiple times.

How can unbind or undelgate in this case th

7条回答
  •  囚心锁ツ
    2020-12-30 10:35

    There are two ways of doing this as pointed out by cHao.

    $('form button').prop('disabled', true);
    

    or

    $('form button').attr('disabled', 'disabled');
    

提交回复
热议问题