ajax对服务端发送请求

时间:2018-05-12 20:07:44   收藏:0   阅读:164

//兼容处理获取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

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!