function authonticate() {
$.ajax({
type: "POST",
url: "http://lp18mobile.azurewebsites.net/LP18WS.asmx/AuthonticateUser",
contentType: "application/jsonp; charset=utf-8",
data: {
"some data"
},
dataType: "json",
success: function (msg) {
//success
}
},
error: function (msg) {
//error
},
});
}
我已经使用 Jquery、json、html5、webservice 来开发应用程序。
当我运行应用程序时,它会抛出
undefined error at "XMLHttpRequest cannot load http://lp18mobile.azurewebsites.net/LP18WS.asmx/AuthonticateUser.
Origin http://'localhost:5733/..' is not allowed by Access-Control-Allow-Origin."
为什么?