XMLHttpRequest.open()
XMLHttpRequest.open(method, url[, async[, user[, password]]])
XMLHttpRequest.onreadystatechange
onreadystatechange: ((this: XMLHttpRequest, ev: Event) => any) | null;
XMLHttpRequest.onreadystatchange = funtion() { .. }
XMLHttpRequest.responseText
JSON.parse(req.responseText);
readystate
값 | 상태 | 기술 |
---|---|---|
0 | UNSENT | 클라이언트가 생성되었습니다. open()아직 요청되지 않음 |
1 | OPENED | open() 호출 |
2 | HEADERS_RECEIVED | send() 호출되었으며 헤더 및 상태를 사용할 수 있다. |
3 | LOADING | 다운로드 responseText부분 데이터를 보유 |
4 | DONE | 작업이 완료 |
XMLHttpRequest.send()