const content = document.getElementById("content"); let xhr = new XMLHttpRequest(); xhr.open('GET', 'https://jsonplaceholder.typicode.com/posts'); xhr.send(); xhr.onload = function () { if (xhr.status >= 200 && xhr.status < 300) { const datas = JSON.parse(xhr.response); for(let i in datas){ let data = document.createElement("h2"); let text = document.createTextNode(`ID - ${datas[i].id} & Title -..
api.jquery.com/load/ .load() | jQuery API Documentation Description: Load data from the server and place the returned HTML into the matched elements. Note: Prior to jQuery 3.0, the event handling suite also had a method named .load(). Older versions of jQuery determined which method to fire based on the set of api.jquery.com jquery를 사용하면 XMLHttpRequest 객체를 따로 사용하지 않고 훨씬 간단하게 사용가능하다. load()는 가장 간..
developer.mozilla.org/ko/docs/Web/Guide/AJAX/Getting_Started Ajax 시작하기 - 웹 개발자 안내서 | MDN 중요: 해당 문서는 2018/07/31 (원문 : 2018/04/23) 에 마지막으로 번역되었습니다. 원문의 변경이 잦아 내용이 다를 수 있으니 참고하십시오. 본 문서는 AJAX의 기본을 익힐수 있도록 해주며, 두 가지 developer.mozilla.org ajax는 Asynchronous JavaScript And XML의 약자로써 서버와 비동기 통신을 위해 사용된다. 비동기통신이란 대부분의 웹사이트에서 서버와 데이터를 주고받을경우 페이지가 새로고침 되는데 비동기통신을 사용하면 새로고침없이 특정부분의 데이터를 변경 할 수 있다. ajax를 사용..