Home » How to Disable Submit Button After Click using jQuery?

How to Disable Submit Button After Click using jQuery?

Today, We want to share with you How to Disable Submit Button After Click using jQuery?.In this post we will show you how to disables submit button until form is filled in jquery, hear for how to prevent multiple clicks on submit button in jquery we will give you demo and example for implement.In this post, we will learn about Disables Button After Click Html In JQuery – Prevent Multiple Clicks with an example.

Read Also:  jquery multidimensional array search by value

How to enable and disable submit button using jQuery?

here simple you can learn to step by step jQuery – How to disabled submit button after clicked

index.html

<!DOCTYPE html>

<html>
<head>

    <title> How to Disable Submit Button After Form Submission in PHP? - www.pakainfo.com </title>
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>

</head>
<body>
<form action="/post.php" method="POST" id="my-form">

    <input type="text" name="name">
    <input type="text" name="email">
    <button type="submit" id="btn-submit">Submit</button>

</form>

<script type="text/javascript">
    $(document).ready(function () {
        $("#my-form").submit(function (e) {
            $("#btn-submit").attr("disabled", true);
            return true;
        });
    });
</script>

</body>

</html> 

I hope you get an idea about Disables Submit Button After Click.
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.

Read Also:  Jquery Angular conflict Solution Example

Related FAQ

Here are some more FAQ related to this Article:

  1. Read Also:  Simple Jquery Scroll To Top Example
  2. Read Also:  jQuery - Hide and Show HTML Elements Example?
  3. Read Also:  Laravel Simple CRUD Application Script
  4. Read Also:  PHP Laravel MySQL CRUD Application
  5. Read Also:  javascript capitalize first letter of each word
  6. Read Also:  Simple DateTime range with two inputs Example
  7. Read Also:  PHP Ajax Form Validation without page refresh
  8. Read Also:  Laravel 5.8 Datatables Server Side Processing
  9. Read Also:  Jquery Angular conflict Solution Example
  10. Read Also:  Simple DateTime range with two inputs Example

Leave a Comment

Your email address will not be published. Required fields are marked *