Ajax原生步骤和代码1.创建 XMLHttpRequest 对象,也就是创建一个异步调用对象2.创建一个新的 HTTP 请求,并指定该 HTTP 请求的方法、URL 及验证信息3.设置响应 HTTP 请求状态变化的函数4.发送 HTTP 请求var SERVER_URL = "url";var xhr = new XMLHttpRequest();xhr.open("GET", SERVER_URL, true);xhr.onreadystatechange = function() { if (this.readyState == 4 && this.status === 200){ console.log(this.responseType) }};xhr.send(null);亲测可以用