省市联动取值问题,帮帮忙哦,已经被困一天了
function cityResult()
{
var city=document.getElementById("ctl00_ContentPlaceHolder1_DropDownList1");
AjaxMethod.GetCityList(city.value,get_city_Result_CallBack);
}
//回发处理---------------------------
function get_city_Result_CallBack(response)
{
if (response.value != null)
{
//debugger---------------------------
document.all("ctl00_ContentPlaceHolder1_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].PlaceName;
var id=ds.Tables[0].Rows[i].PlaceID;
document.all("ctl00_ContentPlaceHolder1_DropDownList2").options.add(new Option(name,id));
}
}
}
return
}
这个是省市联动的js函数
DropDownList1的值可以this.DropDownList1.SelectedValue这样取得
但是我不知道.cs中怎么取DropDownList2的值
大家帮帮我啊,我已经郁闷了一天了,都还没弄出来呢