HomeAboutMeBlogGuest
© 2025 Sejin Cha. All rights reserved.
Built with Next.js, deployed on Vercel
📚
위니브 책 모음(공개 링크)
/
📝
2022 30분 요약 강좌 시즌1
/
📝
jQuery & Ajax(22년 5월 업데이트 완료)
/
📝
5. 콘솔 실습코드
📝

5. 콘솔 실습코드

콘솔에서 복사 붙여넣기 하시면 됩니다. jquery와 fetch는 이미 했으므로 다음 2개의 예제를 준비했습니다.
 
function 로드다됨(e) { console.log(e.currentTarget.response); } var req = new XMLHttpRequest(); var 주소 = "https://raw.githubusercontent.com/paullabkorea/coronaVaccinationStatus/main/data/data.json"; req.addEventListener("load", 로드다됨); req.open("GET", 주소); req.send();
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <script src="https://unpkg.com/axios/dist/axios.min.js"></script> </head> <body> <script> const url = 'https://raw.githubusercontent.com/paullabkorea/coronaVaccinationStatus/main/data/data.json'; axios.get(url).then((response) => {console.log(response)}); </script> </body> </html>