getting value of checked radio button - Javascript jQuery

Javascript examples for jQuery:Form Button

Description

getting value of checked radio button

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.5.2.js"></script> 
  <script type="text/javascript">
    $(window).load(function(){// www .  ja v a2  s .  c o m
console.log($('input[name=tagRow_ddd]:checked').val());
    });

      </script> 
 </head> 
 <body> 
  <input name="tagRow_ddd" type="radio" value="p"> 
  <input name="tagRow_ddd" type="radio" checked value="r">  
 </body>
</html>

Related Tutorials