Changing radio button values and adding classes with jquery - Javascript jQuery

Javascript examples for jQuery:Form Button

Description

Changing radio button values and adding classes with jquery

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://code.jquery.com/jquery-1.6.js"></script> 
  <script type="text/javascript">
    $(window).load(function(){// w  w w .  j  a  v a2  s. c  o m
$radio = $('#radio2');
$radio.get(0).checked = true;
    });

      </script> 
 </head> 
 <body> 
  <input id="radio1" type="radio" name="mybtn" value="0"> 0 
  <br> 
  <input id="radio2" type="radio" name="mybtn" value="1"> 1  
 </body>
</html>

Related Tutorials