var slider = {
'info': 'something',
'get': function(){
var that = this;
$.get("data/index.php?c=Slider&a=get","",function (response) {
that.info = response;
console.log(that.info);
})
console.log(that);
return this.info;
},
'create': function(){
console.log(this.info);
}
}
slider.get();
slider.create();
怎么才能把response数据拿出来呢? 也就是说怎么才能让slider.info更新为ajax回调的数据?
相关分类