//获取单选按钮的值
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");
}
总是无法获取单选按钮的值,是怎么回事?谢谢帮我看下,
慕慕森
狐的传说