专业的编程技术博客社区

网站首页 > 博客文章 正文

获取json数据(获取json数据的某个元素)

baijin 2024-09-05 11:38:18 博客文章 4 ℃ 0 评论

/*

let xml = new XMLHttpRequest();

xml.open('get','js/分页n.json');//获取json数据

xml.send();

xml.onreadystatechange = function(){

if(xml.readyState == 4 && xml.status == 200){

let text = xml.responseText;

data = JSON.parse(text);

fn();//调用函数

}

}

*/

本文暂时没有评论,来添加一个吧(●'◡'●)

欢迎 发表评论:

最近发表
标签列表