<!DOCTYPE html>

<html>

<head>

<meta charset = "UTF-8">

<style sypt="text/css">

#loadingMessageContainer

{

width: 300px;

height: 100px;

text-align: center;

background-color: #DDD;

}

</style>

</head>

<body>

<div id = "12-1_XMLHttpRequestExam">

<h3>12-1_XMLHttpRequestExam</h3>

<p>Toncat 콘솔창을 확인하세요.</p>

<script type = "text/javascript" src = "12-1_XMLHttpRequestExam.js"></script>

</div>


<div id ="12-2_getResult">

<h3>12-2_getResult</h3>

<p>잠시만 기다리세요.</p>

<script type="text/javascript" src = "12-2_getResult.js"></script>

<div id = "loadingMessageContainer">Now loading...</div>

</div>

<div id = "12-3_XMLHttpRequestStatus">

<h3>12-3_XMLHttpRequestStatus</h3>

<script type = "text/javascript" src = "12-3_XMLHttpRequestStatus.js"></script>

<script type = "text/javascript">

HTTP.getText('12-2_getResult.jsp', 

function(result)

{

var content = document.getElementById("resultContainer");

content.innerHTML = "서버로부터 받은 메세지<br/>" + result;

});

</script>

<p>잠시만 기다리세요.</p>

<div id = "resultContainer" style ="border: 1px solid black; width: 300px; height: 100px">Now loading...</div>

</div>


</body>

</html>


12-0_XMLHttpRequest.html


반응형

+ Recent posts