Home > DeveloperSection > Interviews > How do you check or uncheck a checkbox input or radio button?

Posted on    December-05-2012 12:56 AM

 JQuery JQuery 
Ratings:
 1 Answer(s)
  2027  View(s)
Rate this:

AVADHESH PATEL

Total Post:257

Points:1285
Posted on    December-05-2012 1:00 AM

1.$('#num1').attr('checked', true);// Check #num1

2.$('#num1').attr('checked', false);// Uncheck #num1

3.$("#num1").attr('checked', 'checked');// Check #num1

4.$("#num1").removeAttr('checked');// Uncheck #num1

Don't want to miss updates? Please click the below button!

Follow MindStick