function Ajax()
{
var _req = !!0;
try{_req=new XMLHttpRequest;}catch(e){try {_req=new ActiveXObject("MSXML2.XMLHTTP");}catch(e2){try {_req=new ActiveXObject("Microsoft.XMLHTTP");}catch(e3){_req=false;}}}
if (!_req) return;
this.req = _req;
this.send = function(_url,_content,_callback,_method,_isasync)
{
var Url = _url||"";
var Content = _content||"";
var Callback = _callback;
var Method = _method||"GET";
var IsAsync = _isasync==null?true:_isasync;
_req.open(Method,Url,IsAsync);
if(Method=="POST")_req.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
_req.onreadystatechange = function()
{
if(_req.readyState==4&&Callback)
{
Callback(_req.status==200?_req:null);
}
};
_req.send(Method=="POST"?Content:"");
}
this.get = function(_url,_callback)
{
this.send(_url,"",_callback,"GET");
}
this.post = function(_url,_content,_callback)
{
this.send(_url,_content,_callback,"POST");
}
}
**********************************************************************************************
/**************为什么执行到这一行_req.open(Method,Url,IsAsync);就执行不了?
看不懂可以hi我或者Q我。QQ:495724633
值是正确的,第一个是get 第二个是我正确的网址 第三个是true
泛舟湖上清波郎朗