日期:2014-05-16  浏览次数:20462 次

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>