加载中...

11 2021 档案

摘要:1、简单形式 ①JSON中没有undefined值 ②JSON中的字符串必须使用双引号 ③JSON是不能注释的 2、对象形式 JSON的对象形式对应着JS中的对象 { "name":"jiang", "age":18 } 注意:只要和字符串有关的双引号 不支持undefined 3、数组形式 阅读全文
posted @ 2021-11-02 17:21 莫等闲O(∩_∩)O~~ 阅读(93) 评论(0) 推荐(0)
摘要:1、创建xhr对象 const xht=new XMLHttpRequest(); 2、监听事件,处理响应(当获取到响应后,会触发xhr的readystatechange事件) xhr.onreadystatechange=()=>{ if(xhr.readyState! == 4) return; 阅读全文
posted @ 2021-11-01 14:38 莫等闲O(∩_∩)O~~ 阅读(100) 评论(0) 推荐(0)