How do you disable or enable a form element?
Answer / Abhishek Gupta
You can use jQuery's prop() function to disable or enable a form element. For example: $('input-id').prop('disabled', true) to disable, and $('input-id').prop('disabled', false) to enable.
| Is This Answer Correct ? | 0 Yes | 0 No |
How to select element having a particular class (".selected")?
What is the difference between jquery.size() and jquery.length?
What is cdn and how jquery is related to it?
What is the difference between event.PreventDefault and "return false"?
What are the the two types of cdns?
What is difference between $(this) and ‘this’ in jquery?
How can images be made to appear scrolling one over another?
Explain jquery filter?
How to include jQuery in ASP.Net project?
You get "jquery is not defined" or "$ is not defined" error. What could be the reason?
Define width() vs css('width')?
What are the slow selectors in jquery? : jquery mobile