标签:http io os ar sp on log cti ad
// 创建xmlhttpRequest对象
var xh=null;
if(window.ActiveXObject){
xh=new ActiveXObject("Microsoft.XMLHTTP");
}
else if(window.XMLHttpRequest){
xh= new XMLHttpRequest();
}
//第二步 设置回调函数,状态变化后所执行的函数
xh.onreadystatechange = function() {
if (xh.readyState == 4) {
if (xh.status == 200) {
console.log(xh.pesponseText);
}
}
}
//第三步 设置method和地址action
xh.open(‘get‘,/querystu);
//第四步 发送
xh.send();
标签:http io os ar sp on log cti ad
原文地址:http://www.cnblogs.com/Angelinvestment/p/4052009.html