怎樣通過以下代碼獲取ajax回調(diào)的數(shù)據(jù)呢?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數(shù)據(jù)拿出來呢? 也就是說怎么才能讓slider.info更新為ajax回調(diào)的數(shù)據(jù)?
怎么獲取ajax回傳的數(shù)據(jù)
千萬里不及你
2018-10-19 19:11:22