AJAX TEST
페이지 정보
작성자 관리자 작성일 22-11-05 10:48 조회 318 댓글 0본문
<div id="demo">
<h1>The XMLHTTPREQUEST Object</h1>
<button type="button" onclick="loadDoc()">Change Content</button>
</div>
<script>
function loadDoc(){
const xhttp= new XMLHttpRequest();
xhttp.onload= function(){
document.getElementById("demo").innerHTML= this.responseText;
}
xhttp.open("GET", "/zz/text/infomation/youtube.txt");
xhttp.send();
}
</script>
<h1>The XMLHTTPREQUEST Object</h1>
<button type="button" onclick="loadDoc()">Change Content</button>
</div>
<script>
function loadDoc(){
const xhttp= new XMLHttpRequest();
xhttp.onload= function(){
document.getElementById("demo").innerHTML= this.responseText;
}
xhttp.open("GET", "/zz/text/infomation/youtube.txt");
xhttp.send();
}
</script>
The XMLHTTPREQUEST Object
댓글목록 0
등록된 댓글이 없습니다.