채택완료
var xhttp = new XMLHttpRequest(); 에서 로컬파일 불러오기
Copy
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (xhttp.this == 4 && this.status == 200) {
myFunction(this);
}
};
xhttp.open("GET", "note_error.xml", true);
xhttp.send();
위 예제 에서 note_error.xml 파일을 GET 으로 받아오는데,
같은 폴더에 있는 xml 파일도 굳이 xhttp 함수 써서 가져와야 하는 겁니까?
이해가 안가네요?
왜 저렇게 하죠?
include 같은 함수가 안 먹히는 건가요?
답변 3개
채택된 답변
+20 포인트
답변을 작성하려면 로그인이 필요합니다.