One More Radio Button Checked Function

  1. <table>  
  2.     <tr>  
  3.         <td width="150px">Cash Bank Voucher Type:</td>  
  4.         <td><input id="All" name="All" onclick="return myFunction2(this)" type="radio" value="-1" checked="checked" />All</td>  
  5.         <td><input id="Non_Cash_Bank_Voucher" name="Non_Cash_Bank_Voucher" onclick="return myFunction2(this)" type="radio" value="0" />Non Cash Bank Voucher</td>  
  6.         <td><input id="Cash_Bank_Voucher" name="Cash_Bank_Voucher" onclick="return myFunction2(this)" type="radio" value="1" />Cash Bank Voucher</td>  
  7.   
  8.     </tr>  
  9. </table>  
  10.   
  11. <scripts>  
  12.     function myFunction2(CBVTvalue) { $('#All').attr('checked'false); $('#Cash_Bank_Voucher').attr('checked'false); $('#Non_Cash_Bank_Voucher').attr('checked'false); $(CBVTvalue).attr('checked'true); };  
  13. </scripts>