通过js自带的fetch函数读取项目内的json文件,不必再 劳烦 jquery了。
fetch('./MyJsonFile.json').then((response)=> {
response.json().then((jsonContent) => {
console.log(jsonContent)
})
});
通过js自带的fetch函数读取项目内的json文件,不必再 劳烦 jquery了。
fetch('./MyJsonFile.json').then((response)=> {
response.json().then((jsonContent) => {
console.log(jsonContent)
})
});