//城市------------------------------
functioncityResult()
{
varcity=document.getElementById("DropDownList1");
AjaxMethod.GetCityList(city.value,get_city_Result_CallBack);
}
functionget_city_Result_CallBack(response)
{
if(response.value!=null)
{
//debugger;
document.all("DropDownList2").length=0;
vards=response.value;
if(ds!=null&&typeof(ds)=="object"&&ds.Tables!=null)
{
for(vari=0;i
varname=ds.Tables[0].Rows[i].city;
varid=ds.Tables[0].Rows[i].cityID;
document.all("DropDownList2").options.add(newOption(name,id));
}
}
}
return
}
//市区----------------------------------------
functionareaResult()
{
vararea=document.getElementById("DropDownList2");
AjaxMethod.GetAreaList(area.value,get_area_Result_CallBack);
}
functionget_area_Result_CallBack(response)
{
if(response.value!=null)
{
document.all("DropDownList3").length=0;
vards=response.value;
if(ds!=null&&typeof(ds)=="object"&&ds.Tables!=null)
{
for(vari=0;i
varname=ds.Tables[0].Rows[i].area;
varid=ds.Tables[0].Rows[i].areaID;
document.all("DropDownList3").options.add(newOption(name,id));
}
}
}
return
}
functiongetData()
{
varprovince=document.getElementById("DropDownList1");
varpindex=province.selectedIndex;
varpValue=province.options[pindex].value;
varpText=province.options[pindex].text;
varcity=document.getElementById("DropDownList2");
varcindex=city.selectedIndex;
varcValue=city.options[cindex].value;
varcText=city.options[cindex].text;
vararea=document.getElementById("DropDownList3");
varaindex=area.selectedIndex;
varaValue=area.options[aindex].value;
varaText=area.options[aindex].text;
vartxt=document.getElementById("TextBox1");
document.getElementById("<%=TextBox1.ClientID%>").innerText="省:"+pValue+"|"+pText+"市:"+cValue+"|"+cText+"区:"+aValue+"|"+aText;
}
省市 城市 市区