function ajax(url,successFul){
const xhr=new XMLHttpRequest()
xhr.open("Get",url,true)
xhr.onreadystatechange=function()
{
if(xhr.readyState===4){
if(xhr.state===200){
successFn(xhr.responseText)
}
xhr.send(null)
}
标签:function,xhr,url,简易,ajax,手写 From: https://www.cnblogs.com/cmycmy/p/16997980.html