兼容不同浏览器的 Adapter 适配层

// 兼容不同浏览器的 Adapter 适配层
if(typeof window.XMLHttpRequest === "undefined")
{
	window.XMLHttpRequest = function(){
		return new window.ActiveXObject(navigator.userAgent.indexOf("MSIE 5") >=0 ? "Microsoft.XMLHTTP" : "Msxml2.XMLHTTP");
		};
}

你可能感兴趣的:(Ajax)