jquery ajax分页写法我用的是laypage插件 前端代码<pre> function demo(curr) { $.getJSON('/home/index/getinfo', { page: curr || 1 //向服务端传的参数,此处只是演示 }, function (res) { var html = ''; var list = res.data.list; $.each(list, function (k, v) { html += '<div'; if(k%2==…
用太久JQuery了,别忘了Ajax原生是怎么写的 var Ajax = { get : function (url, callback) { var req = Ajax.getRequest(callback); req.open("GET", url, true); req.setRequestHeader("If-Modified-Since","0"); req.send(null); }, post : function (url,…