It works when I remove the disabled attribute on an input type tex开发者_StackOverflow社区t field but not textarea, why?
I set the textarea to be disabled like this:
$('#message').attr('disabled', 'disabled');
which worked, but then later when I did this:
$('#message').removeAttr('disabled');
no luck.
The HTML:
<textarea id="message">Type here...</textarea>
I'm not seeing what you're saying is happening:
<textarea id="message" disabled="disabled">Type here...</textarea>
<input type="button" value="Enable Me!" />
$(":button").click(function(){
$("#message").removeAttr("disabled");
});
http://jsfiddle.net/hunter/TRKzQ/
I'm guessing some other javascript error is happening. Is there more code?
精彩评论