I have a bu开发者_运维百科tton on a page with disable state. I need to enable it when I change a selection in a drop down menu. I'm trying to do this inside CLICK function:
$("#myBtn").attr("disabled", "false");
... but it does not seem to affect it. Is there another way to enable it?
$('#myBtn').removeAttr('disabled')
The presence of the disabled attribute disables the button - it doesn't matter what it's actual value is.
$('#myBtn').removeAttr('disabled');
or $('#myBtn').attr('disabled', false);
精彩评论