0
我用ajax解决了一个使用延迟函数的同步问题。 我现在收到一个响应,现在有一个大的对象与statusResponse等内部。提取响应对象JSON
我的JSONP对象也成功存储在responseJSON对象中。我如何提取它或将它保存在另一个变量中?
var web = new webService();
web.init(app.info);
,这里的类
function webService() {
this.init = function(app) {
var d = this.connect(app).done(function(){});
console.log(d);
}
this.connect = function(app) {
console.log(app);
return $.ajax({
url: 'working url',
dataType: 'jsonp',
jsonp: 'jsoncallback',
timeout: 5000
});
}
}
您能否重新解释这个问题? – Rui
有什么问题?你想从哪里访问数据? –
你期望'console.log(d)'输出什么? – crush