- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to enable and disable submit button using jQuery?
To enable and disable submit button, use the jQuery prop() method. You can try to run the following code to enable and disable submit button using jQuery −
Example
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script> $(document).ready(function() { $('#register').click(function() { $(this).prop('disabled',true); $("#content").show(); setTimeout(function(){ $('#register').prop('disabled', false); },3000); }); }); </script> </head> <body> <div id="btnregister" name="registerbtn"> <input type="submit" value="Click me!" id="register" name="register"/> </div> <div style="display:none;" id="content"> The above button disables for 3 seconds, on clicking. </div> </body> </html>
- Related Articles
- How to disable/ enable checkbox with jQuery?
- How to Disable / Enable a Button in TKinter?
- How to enable the “disabled” attribute using jQuery on button click?
- How to disable/enable an input box with jQuery?
- Display form values after clicking Submit button using event.preventdefault() - jQuery?
- How to submit a form using jQuery click event?
- How to disable right click using jQuery?
- How to link a submit button to another webpage using HTML?
- Can I submit form with multiple submit buttons using jQuery?
- How to enable or disable interlace using imageinterlace() function in PHP?
- How to disable copy content function using jQuery?
- How to globally disable an animation using jQuery?
- Enable and disable interrupts in Arduino
- How to enable or disable local user on Windows OS using PowerShell?
- How to enable / Disable Enhanced Protection Mode in Internet Explorer using PowerShell?

Advertisements