ajax(3)---Conmon.js
2020-12-13 03:43
标签:c http get a cti os //创建xhr对象 兼容方式 //根据Id获取元素对象 ajax(3)---Conmon.js,搜素材,soscw.com ajax(3)---Conmon.js 标签:c http get a cti os 原文地址:http://www.cnblogs.com/buzi521/p/3728602.html
function createXmlHttp() {
var xhobj = false;
try {
xhobj = new ActiveXObject("Msxml2.XMLHTTP"); // ie
msxml3.0+
} catch (e) {
try {
xhobj = new
ActiveXObject("Microsoft.XMLHTTP"); //ie msxml2.6
} catch (e2) {
xhobj = false;
}
}
if (!xhobj &&
typeof XMLHttpRequest != ‘undefined‘) {// Firefox, Opera 8.0+, Safari ,ie10
xhobj = new XMLHttpRequest();
}
return xhobj;
}
function gel(id){
return
document.getElementById(id);
}