jquery get radio button value
<!DOCTYPE html>
<html>
<head>
<title>How to get selected radio button value in Jquery? - w3DIY.com</title>
<script src="http://code.jquery.com/jquery-1.9.1.js" type="text/javascript"></script>
</head>
<body>
<input type="radio" name="sex" class="sex" value="male"> Male
<input type="radio" name="sex" class="sex" value="female"> Female
<button>Click to redirect</button>
<script type="text/javascript">
$(".sex").change(function(){
var selValue = $("input[type='radio']:checked").val();
console.log(selValue);
});
</script>
</body>
</html>