Checking which radio buttons are selected with the help of jQuery.

vishalneeraj-24503
Posted by vishalneeraj-24503 under jQuery category on | Points: 40 | Views : 408
For getting Selected Radio Button item of a form named myForm.
<form id = "myForm">
<input type = "radio" name = "radioName" value = "1" /> 1 <br />
<input type = "radio" name = "radioName" value = "2" /> 2 <br />
<input type = "radio" name = "radioName" value = "3" /> 3 <br />
</form>

$('#myForm input').on('change', function()
{
alert($('input[name=radioName]:checked','#myForm').val());
});

Comments or Responses

Login to post response