Ajax 로드 방법

ajax 로드방법 1.

var ajax = new XMLHttpRequest();
    ajax.onreadyststechange = function(){
    if (this.readyState == 4 && this.status == 200) {
        console.log(ajax.responseText)
        }
};
ajax.open("GET", "url 정보", true);
ajax.send();

ajax 로드방법 2.

fetch('url 정보')
    .then((response) => {
       return response.json()
})
    .then((결과) => {
     console.log(결과)
})

STAY IN THE LOOP

Subscribe to our free newsletter.

[fusion_form form_post_id="4569" margin_bottom="0" hide_on_mobile="small-visibility,medium-visibility,large-visibility" /]

Related Posts

View all
  • Continue reading
  • Continue reading
  • Continue reading
  • Continue reading