xxxxxxxxxx
By LOVE
Here , name=Gender is the name attribute value of the radio button
$("input[name='Gender']:checked").val()
xxxxxxxxxx
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<-- form input radio -->
<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>
<script>
// function onclick
$("input[type='radio'][name='radioName']").click(function() {
var value = $(this).val();
});
// function onchange
$('#myForm input [type="radio"][name="radioName"]').on('change', function() {
alert($var value = $(this).val());
});
// get value by name
$("input[name='radioName']:checked").val()
// get value if has multiple form and get confuse which one will get
$('#myForm input[type=radio]:checked').val()
// another reference
$("input[type=radio][name='radioName']:checked").val()
</script>
xxxxxxxxxx
$('#myForm input').on('change', function() {
alert($('input[name=radioName]:checked', '#myForm').val());
});
xxxxxxxxxx
// Assuming you have a radio input element with the class 'myRadio'
var selectedValue = $('input[name="myRadio"]:checked').val();
xxxxxxxxxx
if ($('input[name="radioName"]:checked', '#myForm').length) {
//Yes, it's checked!
}