Find if a textbox is disabled or not using jquery

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

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

5条回答
  •  梦毁少年i
    2020-12-23 14:42

    You can find if the textbox is disabled using is method by passing :disabled selector to it. Try this.

    if($('textbox').is(':disabled')){
         //textbox is disabled
    }
    

提交回复
热议问题