비동기적인 웹 애플리케이션의 제작을 위해 이용하는 웹 개발 기법이다.
Get 방식 / Post 방식이 있다.
예시는 아래와 같다.
$.ajax({
type: "GET",
url: "https://api.thecatapi.com/v1/images/search",
data: {},
success: function (response) {
console.log(response)
let img_url = response['0']['url']
jQuery("#img-cat").attr("src", img_url);
}
})
상기 내용은 위키백과를 참고하였습니다.