🏆 2024

맛집 분야 크리에이터

🏆 2023

IT 분야 크리에이터

👩‍❤️‍👨 구독자 수

182

✒️ 게시글 수

0
https://tistory1.daumcdn.net/tistory/4631271/skin/images/blank.png 네이버블로그

🩷 방문자 추이

오늘

어제

전체

🏆 인기글 순위

티스토리 뷰

728x90
반응형

 

 

 

jquery에서 ajax로 request.GET, request.POST 호출하는 방법!

 

$.ajax({
    type : 'GET', //POST도 가능
    url : 'domdom.tistory.com', //request URL
    data : {'message': 'hello? my name is domdomi!'}, // 파라미터
    error : function(error) {
    	//request URL 쪽에서 응답에러가 뜨는 등 에러가 났을 경우
        console.log("에러띠..");
    },
    success : function(response) {
    	//정상적으로 response를 받아온 경우
        console.log(response);
    },
    complete : function() {
    	//ajax 호출이 끝난 후의 행동
        console.log("완료되었습니다");
    }
});

 

728x90
반응형
댓글