Check uncheck radio buttons - Javascript jQuery

Javascript examples for jQuery:Form Button

Description

Check uncheck radio buttons

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <script type="text/javascript" src=" https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.js"></script> 
  <script type="text/javascript">
    window.onload=function(){/*from w w  w. j a v  a2 s .c  om*/
$('input:radio').on('click', function(){
   $(this).attr('checked', !$(this).attr('checked'));
});
    }

      </script> 
 </head> 
 <body> 
  <input type="radio"> National 
  <br> 
  <input type="radio"> Divisions  
 </body>
</html>

Related Tutorials