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