chrome浏览器F12调出开发者工具,在开发者工具界面如下:
在Console输入下面的代码
var xhr = new XMLHttpRequest();
xhr.open('GET', 'https://www.xxx.com/api/action');
xhr.send(null);
xhr.onload = function(e) {
var xhr = e.target;
console.log(xhr.responseText);
}回车运行代码
chrome浏览器F12调出开发者工具,在开发者工具界面如下:
在Console输入下面的代码
var xhr = new XMLHttpRequest();
xhr.open('GET', 'https://www.xxx.com/api/action');
xhr.send(null);
xhr.onload = function(e) {
var xhr = e.target;
console.log(xhr.responseText);
}回车运行代码
没有帐号? 立即注册