javascript获取Select当前值,具体代码如下:
function GetObjID(ObjName)
{
for (var ObjID=0; ObjID < window.frm2.elements.length; ObjID++)
if ( window.frm2.elements[ObjID].name == ObjName )
{
return(ObjID);
break;
}
return(-1);
}
function select1Get(ObjName)
{
select1id = GetObjID(ObjName);
for (i=window.frm2.elements[select1id].length-1; i>=0; i--)
{
if (window.frm2.elements[select1id].options[i].selected)
{
select1Value = window.frm2.elements[select1id].options[i].text;
}
}
}
中国足彩网信息请查看IT技术专栏