How to disable/enable a radio buttons or check boxes?

 Posted by vishalneeraj-24503 on 1/3/2015 | Category: jQuery Interview questions | Views: 786 | Points: 40
Answer:

We can enable or disable a radio buttons or check boxes using the .prop() method.We have to write disabled property in prop method.
For Example:-
//To Disable controls
$("#control_id").prop("disabled",true);

//To Enable controls
$("#control_id").prop("disabled",false);


Where,control_id is your checkbox/radio buttons id.


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response