0

这是我尝试访问 Web 服务时遇到的错误

XMLHttpRequest cannot load http:webservice.com/abc
Origin null is not allowed by Access-Control-Allow-Origin.

状态为 200 ok

$.ajax({
    url :"http://webservice/Demo.php",
    type: "GET",
    crossDomain : true,
    error:function(response){
        alert("error");
    }, 
    success:function(response){
        alert("success");
    }                     
});
4

0 回答 0