jQuery implements a method to prevent the submit button from being double clicked

  • 2020-05-19 04:11:17
  • OfStack

This article demonstrates an example of how the jQuery implementation prevents the submit button from being double-clicked. Share with you for your reference. The specific implementation method is as follows:


$("#submit").one('click', function (event) { 
 event.preventDefault();
 //do something
 $(this).prop('disabled', true);
});

I hope this article has been helpful to your jQuery programming.


Related articles: