我有宁静的网络服务。我想通过android中的ajax从本地restful获取json(使用webview)。这是应用程序 android 中的 htmt 文件中的代码 ajax
函数 Get(){ $.ajax ({
url: "[http://localhost:31132/api/Customer][1]",
type: "GET",
dataType: "json",
success: function (data) {
$('#d').append("sucess");
},
error: function (request, status, error) {
$('#d').append(error);
}
});
}
这段代码在浏览器上运行得很好。但它不在android中运行。模拟器 android 使用 API 级别 10。
感谢:D