【发布时间】:2019-07-11 08:18:07
【问题描述】:
Ajax返回404错误码,不是跨域问题。
我想在 TIZEN Web 应用程序项目中向我的 WebService 发出 ajax 请求,该 WebService 具有我需要在 TIZEN 项目中使用的功能。 原来xhr.status是0,解决了一个跨域问题,变成了404。 URL参数准确。
有什么问题?
$.ajax({
crossOrigin:true
, type: "POST"
, url: "http://ip/web projeect/web source/function"
, data: null
, contentType: "application/json; charset=utf-8"
, dataType: "json"
, async: false
, success: function (jSonResult) {
},
error: function (xhr, status, error) {
console.log(xhr.status);
console.log(eval("(" + xhr.responseText + ")"));
}
});
问题:
app.js (154) :404
app.js (155) :undefined
【问题讨论】:
-
当我将代码中的 url 复制到地址栏中时,浏览器告诉我
서버ip的 IP 无法解析。 -
那只是一个没有意义的字符串。
-
你能显示你的路线配置吗?
标签: javascript asp.net ajax