The machine cross-domain test problem browser console code

var xhr = new XMLHttpRequest();
xhr.open('POST', 'http://localhost:8080/login');
xhr.send(null);
xhr.onload = function(e) {
var xhr = e.target;
console.log(xhr.responseText);
}  

测试网站:http://www.jszg.edu.cn/portal/home/index

 

Guess you like

Origin www.cnblogs.com/jiyang2018/p/11350324.html