准备一个分页查询后台方法 比如 selectSomeThingByPage(Integer currentPage,Integer pageSize);
全局变量 var pageSize = 5;
从http://www.oschina.net/code/snippet_2243420_44742中粘过来的挺好用
<script>
window.onscroll =
function
(){
var
marginBot = 0;
if
(document.documentElement.scrollTop){
var
X=document.documentElement.scrollHeight;
var
Y=document.documentElement.scrollTop+document.body.scrollTop;
var
Z=document.documentElement.clientHeight;
marginBot=X-Y-Z;
}
else
{
var
J=document.body.scrollHeight;
var
I=document.body.scrollTop;
var
K=document.body.clientHeight;
marginBot=J-I-K;
}
if
(marginBot<=0) {
}
}
</script>
大概就是这么个意思 看不懂就算了