11 2021 档案
摘要:1、简单形式 ①JSON中没有undefined值 ②JSON中的字符串必须使用双引号 ③JSON是不能注释的 2、对象形式 JSON的对象形式对应着JS中的对象 { "name":"jiang", "age":18 } 注意:只要和字符串有关的双引号 不支持undefined 3、数组形式
阅读全文
摘要:1、创建xhr对象 const xht=new XMLHttpRequest(); 2、监听事件,处理响应(当获取到响应后,会触发xhr的readystatechange事件) xhr.onreadystatechange=()=>{ if(xhr.readyState! == 4) return;
阅读全文

浙公网安备 33010602011771号