<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<htmlxmlns="http://www.w3.org/1999/xhtml">
<head>
<metahttp-equiv="Content-Type"content="text/html;charset=utf-8"/>
<title>无标题文档</title>
<scripttype="text/javascript"src="jquery-1.7.2.min.js"></script>
<scripttype="text/javascript">
$(function(){
varlazyheight=0;
//获取数据
functionshowload(){
lazyheight=parseFloat($(window).height())+parseFloat($(window).scrollTop());
if($(document).height()-100<=lazyheight){
alert("xxx");
}
}
//showload();
//绑定事件
$(window).bind("scroll",
function(){
//当滚动条滚动时
showload();
});
})
</script>
</head>
<body>
<imgsrc="1.webp"/><br/>
<imgsrc="2.webp"/><br/>
<imgsrc="3.webp"/>
</body>
</html>
本文转载自中文网 |