封装好的:ajax.js function ajax(url, fnSucc,fnFaild){ //1[创建] if(window.XMLHttpRequest){ var oAjax = new XMLHttpRequest(); }else{ var oAjax = new ActiveXObject("Microsoft.XMLHTTP"); }; //2: [连接]true:表示异步 oAjax.open('GET',url,true); //3:[发送] oAjax.sen
var api = 'http://192.168.68.208:666/ajax/api.ashx'; // api += 'action=/api/blackhistory/list&keywords=&isPage=1&pageNo=1&pageCount=5' // var api = 'test.txt'; // 获取异步数据 function ajax( callback ){ var req = new XMLHttpRequest(); // req.ope