Disable button after click html in jQuery – prevent multiple clicks

Disable button after click html in jQuery – prevent multiple clicks

Today, We want to share with you Disable button after click html in jQuery – prevent multiple clicks.In this post we will show you Prevent Duplicate Form Submissions with jQuery, hear for jQuery disable submit button on click to prevent multiple form submits we will give you demo and example for implement.In this post, we will learn about javascript/jquery disable submit button on click, prevent double submitting with an example.

Disable button after click html in jQuery – prevent multiple clicks

There are the Following The simple About button after click html in jQuery – prevent multiple clicks Full Information With Example and source code.

  jQuery Enable Disable Submit Button Example

As I will cover this Post with live Working example to develop how to disable submit button after form submission in php, so the how to disable submit button after form submission in javascript for this example is following below.

I short and sweet example for that, we can use simple bellow main your php file. We can see bellow full jquery Source code. We can also check this small and simple jquery source code as well as full code.

small jquery code

$('#submitDataFrm').submit(function(){
    $("#saveCategoryID", this)
      .html("Loading........")
      .attr('disabled', 'disabled');
    return true;
});

Example:

index.html

<!DOCTYPE html>
<html>
<head>
    <title>javascript/jquery disable submit button on click, prevent double submitting</title>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
</head>
<body>
   <h1>Simple jQuery Form Submission Example</h1>
   <p>how to prevent multiple clicks on submit button in jquery.</p>
<form id="submitDataFrm">
    <input type="text" name="name" placeholder="Enetr your Name...">
    <input type="text" name="email" placeholder="Enetr Your Email...">
   
    <button type="submit" id="saveCategoryID">Submit</button>
</form>
   
<script type="text/javascript">
   
$('#submitDataFrm').submit(function(){
    $("#saveCategoryID", this)
      .html("Loading.......")
      .attr('disabled', 'disabled');
    return true;
});
   
</script>
   
</body>
</html>

Web Programming Tutorials Example with Demo

Read :

  create more than one new company for Frontaccounting

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about Disable button after click html in jQuery – prevent multiple clicks.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Leave a Reply

avatar
  Subscribe  
Notify of