//创建一个XMLHttpRequest对象 ,利用此对象与服务器进行通信 是AJAX技术的核心
/**
* 获取XmlHttpRequest对象
*/
function getXMLHttpRequest() {
var xmlHttpReq=
null;
if (window.XMLHttpRequest) {
//Mozilla 浏览器
xmlHttpReq =
new XMLHttpRequest();
}else {
if (window.ActiveXObject) {
//IE 浏览器
try {
xmlHttpReq =
new ActiveXObject("Microsoft.XMLHTTP"
);
}
catch (e) {
try {
//IE 浏览器
xmlHttpReq =
new ActiveXObject("Msxml2.XMLHTTP"
);
}
catch (e) {
}
}
}
}
return xmlHttpReq;
}
转载于:https://www.cnblogs.com/YingYue/p/3741932.html
相关资源:数据结构—成绩单生成器