//兼容处理获取ajax对象
var req = ‘‘;
???????if (window.XMLHttpRequest)
req = new XMLHttpRequest();
???????else
req = new ActiveXObject("Msxml2.XMLHTTP");
???????//建立连接
???????req.open(‘get‘, ‘demo.php‘);
???????//发送请求
???????req.send();
ajax对服务端发送请求
原文地址:https://www.cnblogs.com/wangshengl9263/p/9029526.html