封装ajax
XMLHttpRequest()get// 创建xhrvar xhr=new XMLHttpRequest()// 调用xhrxhr.open('GET','http://www.liulongbin.top:3006/api/getbooks')// xhr.open('GET','http://www.liulongbin.top:3006/api/getbooks?id=1')// 发送xhr.send()// 监听xhr.onreadystatechange=function()
原创
2021-04-07 20:28:41 ·
68 阅读 ·
0 评论