学习jqueryjquery获取选中的radio

<html>
<head>
<script type="text/javascript" src="jquery-1.5.1.js"></script>
<script type="text/javascript">
function show(){
alert($(
"input[name='red']:checked").val());
}
</script>
</head>
<body>
<input type='radio' value='1' name='red'/>1
<input type='radio' value='2' name='red'/>2
<input type='radio' value='3' name='red'/>3
<input type='button' value='choose' onclick='show()'/>
</body>
</html>



原文地址:https://www.cnblogs.com/samlee/p/2230822.html