Ajaxを使ってサーバと通信を行う場合には次のように記述していました。 var xmlHttp; function loadText(){ if (window.XMLHttpRequest){ xmlHttp = new XMLHttpRequest(); }else{ if (window.ActiveXObject){ xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); }else{ xmlHttp = null; } } xmlHttp.onreadystatechange = checkStatus; xmlHttp.open("GET", "ファイル名", true); xmlHttp.send(null); } function checkStatus(){ if (xmlHttp.readyState == 4 && xmlH