87,910
社区成员
发帖
与我相关
我的任务
分享
<script>
function doit(){
var a = document.getElementsByName("IsIndex");
var n;
for(var i=0;i<a.length;i++) {
if(a[i].checked) {n = a[i].value;break;}
}
alert(n);
}
</script>
<input type="radio" name="IsIndex" id="IsIndex" value="1" checked="checked" /> 是
<input type="radio" name="IsIndex" id="IsIndex" value="0" /> 否
<input type="button" value="click" onclick="doit()">