js 判断单选按钮是否被选中
<script language="javascript">
function chaxun(){
var weighttime = document.getElementsByName("weighttime");
for(var i=0;i<weighttime.length;i++){
if(weighttime[0].checked == true){
weight = weighttime[0].value;
alert(weight);
}
}
}
</script>