Aspdotnet-Suresh

aspdotnet-suresh offers C#.net articles and tutorials,csharp dot net,asp.net articles and tutorials,VB.NET Articles,Gridview articles,code examples of asp.net 2.0 /3.5,AJAX,SQL Server Articles,examples of .net technologies

How to Clear Radio Button List Selection in jQuery

Mar 23, 2014
Introduction

Here I will explain how to clear radio button selection in
jQuery or reset / clear radio button list selection in jQuery with example or how to uncheck radio button list in jQuery.

Description:
  
In previous articles I explained jQuery get radio button list selection value, jQuery get all selected checkbox values, jQuery select or deselect checkbox values,
jQuery disable right click on image and many articles related to jQuery. Now I will explain how to clear radio button selection in jQuery with example.

To clear selected radio button list we need to write the code like as shown below


<script type="text/javascript">
function ClearAge() {
$('input:radio[name=rdbage]').attr('checked', false);
}
</script>
If you want complete example check below code


<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>jQuery Clear radio button selection</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script type="text/javascript">
function ClearAge() {
$('input:radio[name=rdbage]').attr('checked', false);
}
</script>
</head>
<body>
<form id="form1">
<div>
<b>Select Age Group:</b>
<input type="radio" name="rdbage" value="10 - 15 Years" /> 10 - 15 Years
<input type="radio" name="rdbage" value="15 - 30 Years" /> 15 - 30 Years
<input type="radio" name="rdbage" value="30 - 50 Years" /> 30 - 50 Years<br/><br/>
<input type="button" id="btnClear" value="Clear Selection" onclick="ClearAge()" />
</div>
</form>
</body>
</html>
Live Demo

If you want to check live demo select age group and click on below button



Select Age Group: 10 - 15 Years 15 - 30 Years 30 - 50 Years




If you enjoyed this post, please support the blog below. It's FREE!

Get the latest Asp.net, C#.net, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email.

subscribe by rss Subscribe by RSS subscribe by email Subscribe by Email

0 comments :

Give your Valuable Comments

Other Related Posts

© 2010-2012 Aspdotnet-Suresh.com. All Rights Reserved.
The content is copyrighted to Suresh Dasari and may not be reproduced on other websites without permission from the owner.