//ajax---------------------------------------------------------- // xmlHttp.responseText responseXML Msxml2.XMLHTTP Microsoft.XMLHTTP var ajno = 0; function ajno_s(){ ajno ++; if (ajno>99){ ajno = 1;} return ajno; } function qstr_s(txt,hd,bun) { if (txt!=""){ txt += "&"; } txt += hd + "=" + encodeURI(bun); return txt; } // Microsoft.XMLHTTP(ie5) Msxml2.XMLHTTP(ie6) function getreq_s() { return this.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("Msxml2.XMLHTTP"); } //同期 false function sync_s(aurl,mode,ban,txt) { alert("sync" + ban); var ano = ajno_s(); var req = getreq_s(); req.onreadystatechange = function(){ resp_s(mode,ban,req); } aurl += "?a=" + ano req.open("POST",aurl,false); req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); req.send(txt); } //非同期 true function async_s(aurl,mode,ban,txt) { var ano = ajno_s(); var req = getreq_s(); req.onreadystatechange = function(){ resp_s(mode,ban,req); } aurl += "?a=" + ano req.open("POST",aurl,true); req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); req.send(txt); }