摘要: XHR 的属性 responseType和response属性 <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>responseType和response属性</title> </head> <body> <script> // 阅读全文
posted @ 2023-03-23 19:53 zj勇敢飞,xx永相随 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 跨域资源共享 1.CORS是什么 //1.CORS是什么 //const url = 'https://www.imooc.com';//不同域 const url ='https://www.imooc.com/api/http/search/suggest?words=js'; const xh 阅读全文
posted @ 2023-03-23 11:25 zj勇敢飞,xx永相随 阅读(20) 评论(0) 推荐(0) 编辑
摘要: JSON 的常用方法 JSON.parse() console.log(JSON.parse(xhr.responseText)); console.log(JSON.parse(xhr.responseText).data); <!DOCTYPE html> <html> <head> <meta 阅读全文
posted @ 2023-03-23 10:22 zj勇敢飞,xx永相随 阅读(44) 评论(0) 推荐(0) 编辑