자바스크립트 리플레이스 (1) 썸네일형 리스트형 javascript hacker new app 두개의 화면 웹앱 만들기 //xmlhtpp을 저장 할 저장소 생성 const ajax = new XMLHttpRequest(); const NEWS_URL = 'https://api.hnpwa.com/v0/news/1.json'; const CONTENT_URL = 'https://api.hnpwa.com/v0/item/@id.json' ajax.open('GET', NEWS_URL, false); ajax.send(); // 데이터 가져오기 //responce에 있는 데이터를 preview 탭에있는것처럼 바꿀것이다. // 객체로 변환 json형식만 변환 가능 const newsFeed = JSON.parse(ajax.response); const ul = document.createElement('ul'); window.add.. 이전 1 다음