我需要将一些从数据库检索到的数据存储到数组中。我知道我们能呈现的数据作为这个例子:如何将数据从Ajax加载到现有阵列中
$('#loader').click(function() {
$.get(
'results.php', {
id: $(this).val()
},
function (data) {
$('#result').html(data);
}
);
});
,但我怎么能function(data){}
存储到一个数组一样var datalist = []
感谢
的可能重复[如何从AJAX调用返回响应?](http://stackoverflow.com/questions/14220321/how-to-return-the-response-from-an-ajax-call) – Barmar