效果图
代码
<body>
<ul></ul>
<script>
function ajax(url,successFn){
var xhr = new XMLHttpRequest();
xhr.open('get',url,true);
xhr.send();
xhr.onreadystatechange=function(){
if(xhr.readyState ==4 && xhr.status == 200){
successFn(xhr.responseText);
}
}
}
var oUl = document.querySelector("ul");
var data0 = "";