jQuery Enable Disable Submit Button Example

Today, We want to share with you jQuery Enable Disable Submit Button Example.In this post we will show you How to enable and disable submit button using jQuery, hear for jQuery – How to disabled submit button after clicked we will give you demo and example for implement.In this post, we will learn about Disable or Enable Submit Button using jQuery .prop() Method with an example.

jQuery Enable Disable Submit Button Example

There are the Following The simple About jQuery Enable Disable Submit Button Example Full Information With Example and source code.

As I will cover this Post with live Working example to develop Enable Disable Submit Button using jQuery, so the some how to enable and disable submit button in php for this example is following below.

Example 1: Enable Or Disable Submit Button Using Jquery

$(document).ready(function() {
     $(':input[type="submit"]').prop('disabled', true);
     $('input[type="text"]').keyup(function() {
        if($(this).val() != '') {
           $(':input[type="submit"]').prop('disabled', false);

Example 2 : Enable Disable Submit Button Based on Validation

<input type="text" name="textTitle" name="suggestion_title" id="suggestion_title" value="" placeholder="Your title" required="" pattern=".{10,100}" maxlength="100" title="Title must be between 10 and 100 characters."/>
<input type="submit" value="send" />

$('input[type="submit"]').attr('disabled', true);
$('input[type="text"]').on('keyup',function() {
    if($(this).val() != '') {
        $('input[type="submit"]').attr('disabled' , false);
        $('input[type="submit"]').attr('disabled' , true);

Example 3 : enable/disable an element using jQuery

$(function() {
  $(":text").keypress(submitbtn).each(function() {

function submitbtn() {
  if ($(this).val().length == 0) {
    $(":submit").attr("disabled", true);
  } else {

Example 4 : jQuery Disable/Enable button in form

<!DOCTYPE html>
<title>Disable a button dynamically created</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
$(document).ready(function() {
    $('#textTitle').click(function() {

           $('#textTitle').prop('disabled', false);

<div id="btnregister" name="registerbtn">
<p>jQuery disable button — Disabling and enabling buttons with jQuery</p>
    <input type="submit" value="Click me!" id="textTitle" name="textTitle"/>
<div style="display:none;" id="ckcontent">
  The above Clcik button disables for 4 seconds, on clicking.                


Angular 6 CRUD Operations Application Tutorials

Read :


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

I hope you get an idea about jQuery Enable Disable Submit Button Example.
I would like to have feedback on my Pakainfo.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.

Related FAQ

Here are some more FAQ related to this Article:

  1.   VueJS Show Hide Password in Password TextBox with CheckBox
  2.   Global Config variable In Laravel 6 Example
  3.   Disable button after click html in jQuery - prevent multiple clicks
  4.   Laravel 7 jQuery Ajax Form Validation Example
  5.   Laravel Validation and Bootstrap Modal Popup Form Submit with Ajax
  6.   Disable submit button until Ajax Completes Example
  7.   jQuery Disable Button After Click Example
  8.   AngularJS Arrays - tips, tricks and examples
  9.   how to insert data using ajax in laravel with datatables?
  10.   Laravel 6.2 Create Custom Helper Tutorial with Example