3
我想做一个简单的Windows 8应用程序,但我有一个问题。 当我尝试做一个XHR请求到本地网络服务器失败,错误代码:0x2efdWinJS.xhr本地网络错误
示例代码:
WinJS.xhr({ url: "http://192.168.0.30" }).then(
function completed(response) {
//var json = JSON.parse(response.responseText);
//var list = new WinJS.Binding.List(json.results);
console.log(response.responseText);
},
function error(error) { console.log(error) },
function progress(progress) { }
);
但是当我尝试远程IP例如google.com它的工作原理。 什么问题?
容易忘记那一个。 –
另外,我不得不使用IP来工作,'localhost'没有切断它。 – kamranicus