标签:js
function getHTTPObject(){
if(typeof XMLHttpRequest == "undefined")
XMLHttpRequest = function(){
try{return new ActiveXObject("Msxml2.XMLHTTP.6.0");}
catch(e){}
try {return new ActiveXObject("Msxml2.XMLHTTP.3.0");}
catch(e){}
try{return new ActiveXObject("Msxml2.XMLHTTP");}
catch(e){}
return false;
}
return new XMLHttpRequest();
}
// var request = new XMLHttpRequest();
// alert(request)
Ajax 对象创建 兼容各个浏览器 通用方法getHTTPObject.js
标签:js
原文地址:http://xuyran.blog.51cto.com/11641754/1783394