|

楼主 |
发表于 2020-2-23 13:45:01
|
显示全部楼层
用的Ajax啊,可以的
if (response.value != null)
{ 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]["city"];
alert(name)
document.all("DropDownList2").options.add(new Option(name,id));
}
}
}
ds.Tables[0].Rows.length是可以取到值的! |
|