console.log("Begin 12-2");


var HTTPCtrl = 

{

getHTTP: function()

{

var xmlhttp= null;

if(window.XMLHttpRequest)

{

xmlhttp= new XMLHttpRequest();

}

else

{

xmlhttp= new ActiveXObject("Microsoft.XMLHTTP");

}

return xmlhttp;

}

};


var request = HTTPCtrl.getHTTP();

request.open('get', '12-2_getResult.jsp', true);

request.send();


request.onreadystatechange = function()

{

var divElem= document.getElementById('loadingMessageContainer');

if(request.readyState === 4)

{

var msg= request.responseText;

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

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

}

else

{

divElem.style.display= '';

}

};


console.log("End 12-2");


12-2_getResult.js


반응형

+ Recent posts