开发者

Enable button with jQuery

开发者 https://www.devze.com 2023-02-24 14:23 出处:网络
I have a bu开发者_运维百科tton on a page with disable state. I need to enable it when I change a selection ina drop down menu. I\'m trying to do this inside CLICK function:

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

精彩评论

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