我正在尝试加载页面时加载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
,结果相同