how to call function if button is enabled javascript html code example Example: enable html button $('#Button').prop('disabled', true);