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.

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 *