DOMDOM
0posts
today
total
personal posts · since 2021

Fragments
of a day.

A small notebook for slow moments slipping by.

2023 IT Creator
2024 Food Creator
2025 News Creator
2026 News Creator

Latest Posts최근

tistory view

Back to Home

[jquery] ajax 비동기방식 호출하기

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
반응형

Comments

Thanks for staying up late.

keep wandering · keep listening