Q:

get value of checked radio button jquery

By LOVE
Here , name=Gender is the name attribute value of the radio button

$("input[name='Gender']:checked").val()
1
$('#radio-button-id').click(function() {
  if($('#radio-button-id').is(':checked')) 
  { 
    //input where you put a value
    $('#program').val("radio-button-text");
  }                      
});
2
$('input:radio[name="postage"]').change(function(){

        if ($(this).val() == 'Yes') {
            //true
        }
        else {
            //false
        }
    });
0
$('form input[type=radio]:checked').val();
5
$(document).ready(function(){
  $('#submit_button').click(function() {
    if (!$("input[name='name']:checked").val()) {
       alert('Nothing is checked!');
        return false;
    }
    else {
      alert('One of the radio buttons is checked!');
    }
  });
});
0
if ($('input[name="radioName"]:checked', '#myForm').length) {
	//Yes, it's checked!
}
1

New to Communities?

Join the community