<script type="text/javascript">
function radiovalue(form)
{
var mylen = form.rvinfo.length;
alert("라디오 버튼 갯수:" + mylen);
if (mylen == "undefined") //조회된 갯수가 1개일경우
{
mylen = 1;
}
for ( var i = 0;i < mylen; i++)
{
if (form.rvinfo[i].checked == true)
{
alert("선택한 값:" + form.rvinfo[i].value);
break;
}
}
if (i == mylen)
{
alert("선택하세요!");
return;
}
}
</script>
<form name="rvForm">
<input type="radio" name="rvinfo" value="1">일<br />
<input type="radio" name="rvinfo" value="2">이<br />
<input type="radio" name="rvinfo" value="3">삼<br />
<input type="button" value="test" onclick="radiovalue(this.form)">
</form>