您好我已经使用此javascript函数创建了一个html页面
function getData() {
if(window.XMLHttpRequest) {
req = new XMLHttpRequest();
req.onreadystatechange=sendData;
req.open("GET", "http://service-page/axis2Example-1.0.0-SNAPSHOT/services/SystemService/viewUsers?positionX=10&positionY=30&round=10", true);
req.send();
}
}
function sendData() {
if(req.readyState==4 & req.status==200) {
}
}
此功能用于调用Web服务。问题是我的浏览器回答了这条消息:
XMLHttpRequest cannot load ........ autoCreate=false&log=true. Origin ...... is not allowed by Access-Control-Allow-Origin.
有谁知道解决方案?