上一页 1 2 3 4 5 6 7 ··· 55 下一页
摘要: 封装Ajax <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>封装Ajax</title> </head> <body> <script type="module"> /* const url = 'https://www.im 阅读全文
posted @ 2023-03-24 15:06 zj勇敢飞,xx永相随 阅读(14) 评论(0) 推荐(0) 编辑
摘要: XHR 的事件 load事件 //1.load事件 //响应数据可用时触发 const url ='https://www.imooc.com/api/http/search/suggest?words=js'; const xhr = new XMLHttpRequest(); // xhr.on 阅读全文
posted @ 2023-03-24 09:48 zj勇敢飞,xx永相随 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 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) 编辑
摘要: 初识 JSON 1.JSON是什么 Ajax 发送和接收书数据的a56爆大奖在线娱乐格式 XML username=alex&age=18 JSON Json 全称是JavaScript Object Notation 2.为什么需要JSON JSON有3中形式,每种形式的写法都和JS中的数据类型很像,可以很轻松的 阅读全文
posted @ 2023-03-22 16:14 zj勇敢飞,xx永相随 阅读(106) 评论(0) 推荐(0) 编辑
摘要: GET 请求 携带数据 <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> </head> <body> <!-- <form id="login" action="https://www.imooc.com/ap 阅读全文
posted @ 2023-03-22 14:42 zj勇敢飞,xx永相随 阅读(25) 评论(0) 推荐(0) 编辑
摘要: Ajax 的基本用法-1 XMLHttpRequest Ajax想要实现浏览器服务器之间的异步通信,需要依靠XMLHttpRequest,它是一个构造函数 不论是XMLHttpRequest,还是Ajax,都没有和具体的某种数据格式绑定 Ajax的使用步骤 创建xhr对象 <!DOCTYPE htm 阅读全文
posted @ 2023-03-22 11:36 zj勇敢飞,xx永相随 阅读(15) 评论(0) 推荐(0) 编辑
摘要: localStorage 的注意事项 localStorage 的存储期限 localStorage 是持久化的本地存储,除非手动请求(比如通过js删除,或者清除浏览器缓存),否则数据是永远不会过期的 sessionStorage 当前会话结束(比如关闭浏览器)的时候,sessionstorage中 阅读全文
posted @ 2023-03-22 10:38 zj勇敢飞,xx永相随 阅读(25) 评论(0) 推荐(0) 编辑
摘要: 初识 localStorage-1 1.localStorage是什么 localStorage 也是a56爆大奖在线娱乐浏览器存储数据的方式(本地存储),它只是存储在本地,不会发送到服务器端 单个域名下的localStorage总大小有限制 2.在浏览器中操作localStorage 3.localStorage 阅读全文
posted @ 2023-03-22 09:23 zj勇敢飞,xx永相随 阅读(70) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 55 下一页