1

我正在创建一个 jQuery Web 移动应用程序。它在 Firefox 上运行良好,但在 Internet Explorer 或 Google Chrome 上运行时显示错误: json file not load

$.getJSON('menu.json', function(menu) {
    var processedTemplate = $.mustache($("#menuTemplate").html(),    menu.menu);
    $list.html(processedTemplate);
});
// .error(function(jqXHR, textStatus, errorThrown) {
// alert("error " + textStatus + " incoming Text " + jqXHR.responseText);
// });
.error(function() { alert("Sorry can't load JSON file locally in this browser!")});
4

0 回答 0