// 获取http请求
function getXMLHttpRequest() {
req = false;
//本地XMLHttpRequest对象
if (window.XMLHttpRequest) {
try {
req = new XMLHttpRequest();
} catch (e) {
req = false;
}
//IE/Windows ActiveX版本
} else if (window.ActiveXObject) {
try {
req = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
req = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {
req = false;
}
}
}
return req;
}
转载请标明出处:http://www.cnblogs.com/ssslinppp/