'How can I select one group radio button from two groups and get the value of selected radio?

I want to select one group radio button from two groups and get the value of the selected radio in a variable and show it in another place.

function uncheckRadioBtnSet() {
  if ($('[name="input_15"]').is(":checked").val()) {
    $('input[name="input_17"]').removeAttr("checked");
    jQuery(this).off("click");
  } else {
    $('input[name="input_15"]').removeAttr("checked");
    $(this).off("click");
  }
}

$("input[name='input_15']").click(function () {
  $('input[name="input_17"]').prop("checked", false);
});
$("input[name='input_17']").click(function () {
  $('input[name="input_15"]').prop("checked", false);
});


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source