function ajax(url, fnSucc, fnFaild){
var oAjax = null;
if(XMLHttpRequest)
{
oAjax = new XMLHttpRequest();
}
else
{
oAjax = ActiveXObject("Microsoft.XMLHTTP");
}
oAjax.open('Get',url,true);
oAjax.send();
oAjax.onreadystatechange = function(){
if(oAjax.readyState == 4)
{
if(oAjax.status == 200)
{
fnSucc(oAjax.responseText);
}
else
{
if(fnFaild)
{
fnFaild();
}
}
}
};
};
Ajax框架
最新推荐文章于 2021-08-05 13:10:58 发布