asp.net实现三级城市级联+ashx服务端提供数据
- 编辑:admin -asp.net实现三级城市级联+ashx服务端提供数据
);}}sb.Remove(sb.Length-1,selectCity);$(#S2).bind(change,url:ajAjaxUrl,type:post,。
success:function(msg){varxdata=eval(msg);for(vari=0;ixdata.length;i++){$(#S1).append(optionvalue=+xdata[i].ProvinceID++xdata[i].ProvinceName+/option);}if(ProciceValue!=){$(#S1).find(option[value=+ProciceValue+]).attr(selected,Citynote2city=IService.GetCityById((int)LoginInfo.StructUser.TheCity.ParentId);if(note2city!=null){list=list.Where(a=a.ID==note2city.ParentId).ToList();}}else{sb.Append({\ProvinceID\:\0\,);}sb.Remove(sb.Length-1,);}}foreach(Cityiteminlist){sb.Append({);sb.Append(\ProvinceID\:\+item.ID+\,selectDistrict);}}})};/script