jQuery disable/enable submit button,Disabling and enabling a html input button,Disable and Enable submit button in jquery,Disable/Enable Submit Button until all forms have been filled
<!DOCTYPE html> <html> <head> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <meta charset="utf-8"> <title>Disable/enable the form submit button</title> </head> <body> <input id="accept" name="accept" type="checkbox" value="y"/>I accept<br> <input id="submitbtn" disabled="disabled" name="Submit" type="submit" value="Submit" /> </body> <script> $('#accept').click(function() { if ($('#submitbtn').is(':disabled')) { $('#submitbtn').removeAttr('disabled'); } else { $('#submitbtn').attr('disabled', 'disabled'); } }); </script> </html>