How to Disable/enable button using jQuery

This is a very common scenario, where you want to enable or disable the submit button or any button on a web page after you have entered some text or value in an input box. You may also like How to read more / hide text using Jquery and PHP and How to limit text length in php and provide ‘Read more’ link.

Disable Button

$("#upload_button").prop('disabled', true);

Enable Button

$("#upload_button").prop('disabled', false);

Leave a Reply

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