데이터베이스에서 검색된 일부 데이터를 배열에 저장해야합니다. 나는 우리가이 예제로 데이터를 표시 할 수 있습니다 알고Ajax에서 기존 배열로 데이터를로드하는 방법
$('#loader').click(function() {
$.get(
'results.php', {
id: $(this).val()
},
function (data) {
$('#result').html(data);
}
);
});
을하지만 어떻게 내가 들어오는 데이터가 JSON입니다 가정 var datalist = []
감사
중복 가능성을 [어떻게 AJAX 호출 응답을 반환하려면?] (http://stackoverflow.com/questions/14220321/how-to-return-the-response-from-an-ajax-call) – Barmar