【发布时间】:2019-02-24 11:25:28
【问题描述】:
我正在尝试在页面加载时加载 json 文件。所以我尝试了这段代码:
$( document ).ready(function() {
$.getJSON("./db/url.json", function(json) {
console.log(json);
});
console.log("The page is loaded");
});
导致这个错误:
[Show/hide message details.] TypeError: $.getJSON is not a function[Learn More]
我读了一些类似的帖子,但我仍然无法弄清楚。你能帮忙吗?
如果我使用$.ajax,结果相同
【问题讨论】: