Ajax, prevent multiple request on click

前端 未结 10 2271
忘掉有多难
忘掉有多难 2020-11-28 04:10

I\'m trying to prevent multiple requests when user click on login or register button. This is my code, but it doesn\'t work. Just the first time works fine, then return fals

10条回答
  •  北荒
    北荒 (楼主)
    2020-11-28 04:58

    You can disable the button.

    $(this).prop('disabled', true);
    

提交回复
热议问题