How to get radio button value using jquery.
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.4/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("p").click(function(){
$('input[name="rd1"]:checked').val();
});
});
</script>
</head>
<body>
<p>click here</p>
<form>
<input type="radio" name="rd1" value="1"> yes
<input type="radio" name="rd1" value="0"> No
</form>
</body>
</html>
Get the latest news and updates by signing up to our daily newsletter.We won't sell your email or spam you !