---
title: "How do you check or uncheck a checkbox input or radio button?"  
description: "How do you check or uncheck a checkbox input or radio button?"  
author: "AVADHESH PATEL"  
published: 2012-12-05  
updated: 2020-09-22  
canonical: https://www.mindstick.com/interview/1585/how-do-you-check-or-uncheck-a-checkbox-input-or-radio-button  
category: "jquery"  
tags: ["jquery"]  
reading_time: 1 minute  

---

# How do you check or uncheck a checkbox input or radio button?

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

## Answers

### Answer by AVADHESH PATEL

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


---

Original Source: https://www.mindstick.com/interview/1585/how-do-you-check-or-uncheck-a-checkbox-input-or-radio-button

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
