ajax基础版
function ajax(options){ var req=new XMLHttpRequest() req.open(options.type,options.url,true) req.onreadystatechange=function(){ if(req.readyState==4&&req.status==200){ options.success(req.responseText) } } req.send(null) }
ajax({
url:"http://www.wuguosong.top/api/list_b",
type:"get",
success:(res)=>{
console.log(res)
}
})