<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<title></title>
<style type="text/css">
p{border: 1px solid #cecece;}
</style>
<script src="js/jquery-2.1.0.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
$(function(){
for(var i=0;i<30;i++){
$('body').append('<p>'+i+'</p>')
}
$(document).scroll(function() {
var dh = $(document).height();
var wh = $(window).height();
var sch = parseInt(dh)-parseInt(wh)
var c = $(window).scrollTop();
console.log(c);
if( c==sch ){
for(var i=0;i<30;i++){
$('body').append('<p>'+i+'</p>')
}
}
});
})
</script>
</head>
<body>
</body>
</html>
网友评论