日期:2014-05-16 浏览次数:20363 次
function HttpRequest(sUrl, fpCallback) {
this.request = this.createXmlHttpRequest();
//this.request.open("GET", sUrl, true);
this.request.open("GET", sUrl, false);
this.send();
return fpCallback(this.request.responseText);
/*var tempRequest = this.request;
function request_readystatechange() {
if (tempRequest.readyState == 4) {
if (tempRequest.status == 200) {
fpCallback(tempRequest.responseText);
}
else {
return false;
}
}
}
this.request.onreadystatechange = request_readystatechange;*/
}
///....其他原来的代码
function verifys() {
var request = new HttpRequest("http://127.0.0.1/test1/testverify.php", test4);
//request.send();
return request;
}