我需要查找是否使用 Jquery 禁用或启用了文本框。
.prop('disabled') will return a Boolean:
.prop('disabled')
var isDisabled = $('textbox').prop('disabled');
Here's the fiddle: http://jsfiddle.net/unhjM/
You can use $(":disabled") to select all disabled items in the current context.
$(":disabled")
To determine whether a single item is disabled you can use $("#textbox1").is(":disabled").
$("#textbox1").is(":disabled")
You can find if the textbox is disabled using is method by passing :disabled selector to it. Try this.
is
:disabled
if($('textbox').is(':disabled')){ //textbox is disabled }
You can check if a element is disabled or not with this:
if($("#slcCausaRechazo").prop('disabled') == false) { //your code to realice }
if($("element_selector").attr('disabled') || $("element_selector").prop('disabled')) { // code when element is disabled }