摘要: $(() => { const getUrl = 'http://www.liulongbin.top:3006/api/getbooks'; const postUrl = 'http://www.liulongbin.top:3006/api/addbook'; // 传统方式GET $('#b 阅读全文
posted @ 2022-09-18 19:23 HM-7 阅读(56) 评论(0) 推荐(0)
摘要: XMLHttpRequest:用于请求服务器上的资源。 使用XMLHttpRequest发起get请求: ① 创建xhr对象 ② 调用xhr.open函数:请求类型和请求地址 ③ 调用xhr.send函数 ④ 监听xhr.onreadystatechange事件 // 创建xhr对象 let xhr 阅读全文
posted @ 2022-09-18 09:54 HM-7 阅读(30) 评论(0) 推荐(0)