标签: javascript asynchronous xmlhttprequest
如何从http onload函数获取响应值?我知道它是异步调用的东西!
httpRequest.onload = function() { var response = JSON.parse(this.responseText); test(response); /*....*/ }; exports.test = function(){ return response; };
提前致谢!