日期:2014-05-17 浏览次数:20682 次
_this.sltProvince.change(function (e) {
_this.GetCityInfo();
});
PerfectInfo.prototype.GetCityInfo = function (e) {
var _this = this;
var aj = 1;
var postData = {};
var sltProvince = $("select[name='sltProvince']").val();
postData["provinceId"] = sltProvince;
if (aj == 1) {
aj = 0;
$.ajax({
type: "post",
url: "/ClubHome/DoGetCityInfo?time=" + (new Date()).getTime(), //调用方法
data: postData,
dataType: 'json',
success: function (x) {
if (x) {
if ("FALIED" === x.code) {
alert(x.msg);
return false;
} else {
var str = "";
for (var i = 0; i < x.length; i++) {
str += "<option value=" + x[i].CityId + ">" + x[i].CityName + "</option>";
}
$("select[name='sltCity']").append(str);
}
}
},
complete: function () { aj = 1; }
});
}
return false;
}