I want to Enable all disabled input and select elements before submiting the form so i can get all disabled elements values.
So i tried
function enable() {
$('input[type="text"], input[type="checkbox"], select').prop("disabled", true).each(function () {
if ($(this).is(':disabled')) {
$(this).attr('disabled', false);
}
});
}
This code is not working so could you please help me to this job.
Thanks in Advance....
You can try
function enable() {
$('input:disabled, select:disabled').each(function () {
$(this).removeAttr('disabled');
});
}
http://api.jquery.com/disabled-selector/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With