jQuery에서 JSON 문서 가져오기 > 개발자팁

개발자팁

개발과 관련된 유용한 정보를 공유하세요.
질문은 QA에서 해주시기 바랍니다.

jQuery에서 JSON 문서 가져오기 정보

PHP jQuery에서 JSON 문서 가져오기

본문


$.ajax({
    type: 'post',
    dataType: 'json',
    url: '/ajax.php',
    data: {val1:'변수1', val2:'변수2'},
    success: function (data) {
        console.log(data);
    },
    error: function (request, status, error) {
        console.log('code: '+request.status+"\n"+'message: '+request.responseText+"\n"+'error: '+error);
    }
});
 
추천
0
  • 복사

댓글 0개

© SIRSOFT
현재 페이지 제일 처음으로