如题,可能又是某个代码不支持造成的!希望高手改正:
代码如下,问题可能就在“function get_city_Result_CallBack(response)”这个函数里
     <script language="javascript" type="text/javascript">
//城市------------------------------
function cityResult() 

var city=document.getElementById("DropDownList1");
AjaxMethod.GetCityList(city.value,get_city_Result_CallBack);
}

function get_city_Result_CallBack(response)
{
if (response.value != null)
{
//debugger;
document.all("DropDownList2").length=0;    
     var ds = response.value;
if(ds != null && typeof(ds) == "object" && ds.Tables != null)
{
for(var i=0; i<ds.Tables[0].Rows.length; i++)
     {
     var name=ds.Tables[0].Rows[i].shiName;
       var id=ds.Tables[0].Rows[i].shiID;
       document.all("DropDownList2").options.add(new Option(name,id));
     }
}

}
else
{   
 document.all("DropDownList2").length=0;
}
return
}
function getdata()
{
    var classID=document.getElementById("DropDownList3");
    var classindex=classID.selectedIndex;
    var classValue=classID.options[classindex].value;
    var classText=classID.options[classindex].text;
    
    
    var province=document.getElementById("DropDownList1");
                var pindex = province.selectedIndex;
                var pValue = province.options[pindex].value;
                var pText  = province.options[pindex].text;
                
                var city=document.getElementById("DropDownList2");
                var cindex = city.selectedIndex;
                var cValue = city.options[cindex].value;
                var cText  = city.options[cindex].text;
                window.location.href="showinfo.aspx?classID="+classValue+"&shengID="+pValue+"&shiID="+cValue;
}
</script>

解决方案 »

  1.   

    刚查到说FF不支持document.all,可是改用
    getElementsByTagName("*") 可以得到得到所有元素的集合
    getElementById             可以按id得到某一元素
    getElementsByName         可以得到按name属性得到某一元素
    都不行
      

  2.   

    document.all
    =>
    document.getElementById有一部分 你还没有替换
      

  3.   

    DropDownList1=><%=DropDownList1.ClientID%>其它服务器控件ID 也是如此
      

  4.   

    想支持多浏览器,首选jQuery,让你轻松摆脱噩梦复杂的js操作开发效率提升200%以上,估计运行效率也比你自己写的提升不少你是js高手除外
      

  5.   

    正解!!!
    不过还有个问题请教,在google浏览器里执行时出现完全不对应的情况,这又是为什么呢?
    真是麻烦啊!