有人可以帮忙吗?当UpdateDataSuccessCallback运行时,'this.localData'总是未定义的,我想我没有得到RebateDataClass的this.localData,但是我怎么能在UpdateDataSuccessCallback中得到它?非常感谢
function RebateDataClass(d) {
this.localData;
var getdate = d;
this.Init = function init() {
getdata('get', "../tools/AgentRebateReportHandler.ashx?action=GetIndexData&dateType=" + getdate + "&r=" + Math.random, '', 'json', InitDataSuccessCallback, true);
}
function InitDataSuccessCallback(e) {
this.localData = e.data;
IndexPage.InitPage(getdate, e.data);
}
this.UpdateDataByDate = function UpdateData() {
getdata('get', "../tools/AgentRebateReportHandler.ashx?action=GetIndexData&dateType=" + getdate + "&r=" + Math.random, '', 'json', UpdateDataSuccessCallback, true);
}
function UpdateDataSuccessCallback(e) {
if (e.state == "ok") {
IndexPage.UpdatePage(getdate, this.localData, e.data);
//the this.localData is undefined
this.localData = e.data;
} else {
}
}