Copy Code code as follows:
<title> pull scroll bar load data </title>
<script src= "Scripts/jquery-1.4.1.min.js" type= "Text/javascript" ></script>
<script type= "Text/javascript" >
$ (function () {
var i = 4;$ (window). Bind ("scroll", Function (event)
{
Scroll bar to the height of the head of the page, compatible ie,ff,chrome
var top = Document.documentElement.scrollTop + Document.body.scrollTop;
The height of the Web page
var textheight = $ (document). Height ();
Page height-top-Current window height
if (Textheight-top-$ (window). Height () <= {if (i >=) {return;
Maximum control can only be loaded to 100
}
$ (' #div1 '). CSS ("height", $ (document). Height () + +); i++;
Dynamic data can be loaded into the DIV1 according to the actual situation.
$ (' <div> ' + i + ' </div> '). Appendto ($ (' #div1 '));
}
});
})
</script>
<style>
#div1 Div
{
font-size:100px;
Background: #ccc;
margin-top:5px;
}
</style>
<body>
<form id= "Form1" runat= "Server" >
<div style= "height:1000px" id= "Div1" >
<div>
</div>
<div>
</div>
<div>
</div>
<div>
</div>
</div>
</form>
</body>