Find if a textbox is disabled or not using jquery

后端 未结 5 1586
情书的邮戳
情书的邮戳 2020-12-23 14:06

I need to find if a textbox is disabled or enabled using Jquery.

5条回答
  •  执念已碎
    2020-12-23 14:41

    .prop('disabled') will return a Boolean:

    var isDisabled = $('textbox').prop('disabled');
    

    Here's the fiddle: http://jsfiddle.net/unhjM/

提交回复
热议问题