<form name="form1" method="get" action="" >
<input name="rb1" type="radio" value="1" onclick = "getvalue('1')">
??一
<input name="rb1" type="radio" value="2" onclick = "getvalue('2')">
??二
<input name="rb1" type="radio" value="3" onclick = "getvalue('3')">
??三
</form>
<script language = "javascript">
function getvalue(str){
alert(str);
}
</script>
<input name="rb1" type="radio" value="1" onclick = "getvalue('1')">
??一
<input name="rb1" type="radio" value="2" onclick = "getvalue('2')">
??二
<input name="rb1" type="radio" value="3" onclick = "getvalue('3')">
??三
</form>
<script language = "javascript">
function getvalue(str){
alert(str);
}
</script>
用ASP实现的.demo.htm<form name="form1" method="get" action="test.asp" >
<input name="rb1" type="radio" value="1">
选项一
<input name="rb1" type="radio" value="2">
选项二
<input name="rb1" type="radio" value="3">
选项三
</form>test.asp<%=Request("rb1")%>
demo.htm少了个提交按钮.
<input type="submit">如果是在前端判断的话.<form name="form1" method="get" action="test.asp" >
<input name="rb1" type="radio" value="1">
选项一
<input name="rb1" type="radio" value="2">
选项二
<input name="rb1" type="radio" value="3">
选项三
</form>
<script>
document.onclick=function(){if(event.srcElement.value)alert(event.srcElement.value)}
</script>