//获取单选按钮的值function check_radio(){alert("a");//var Select=document.getElementById("Select1");var str=new String();var chkObjs = document.getElementsByName("radio");var hidden=document.getElementById("Hidden1");for(var i=0;i<chkObjs.length;i++){if(chkObjs[i].checked==true){if(chkObjs[i].value="其他"){ alert(chkObjs[i].value); str=document.getElementById('Select1').options[document.getElementById('Select1').selectedIndex].text;}else{ str=chkObjs[i].value;}} }if(str.length > 0) { hidden.value=str; }alert(str)alert("dsadssa");}总是无法获取单选按钮的值,是怎么回事?谢谢帮我看下,
- 2 回答
- 0 关注
- 324 浏览
添加回答
举报
0/150
提交
取消