开发者

Enable button with jQuery

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);

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜