浏览器控制台模拟跨域

var xhr = new XMLHttpRequest();
xhr.open('OPTIONS', 'http://127.0.0.1:8000/hello');
xhr.send();
xhr.onload = function(e) {
  var xhr = e.target;
  console.log(xhr.responseText);
}

你可能感兴趣的:(浏览器控制台模拟跨域)