随便打开一个页面,F12打开开调试页面,导航栏找到console,直接在console中复制修改访问路径,回车,如果出现XX……则为跨域,如果进入了服务并返回了响应则表示没有跨域问题;
var xhr = new XMLHttpRequest();
xhr.open('GET', 'http://xxx.xxx.com/');
xhr.send(null);
xhr.onload = function(e) {
console.log(e);
}
随便打开一个页面,F12打开开调试页面,导航栏找到console,直接在console中复制修改访问路径,回车,如果出现XX……则为跨域,如果进入了服务并返回了响应则表示没有跨域问题;
var xhr = new XMLHttpRequest();
xhr.open('GET', 'http://xxx.xxx.com/');
xhr.send(null);
xhr.onload = function(e) {
console.log(e);
}