스크롤바 내릴경우 기존 결과물에 몇개만 더 추가적으로 붙이는 형태가 많은데
대표적으로 트위터가그렇고..
밑에 소스에 ajax이용해서 쓰면 나름 모양은 같은 모양이 나올듯..
<html>
<head>
<script type="text/javascript">
function checkTargetScroll(){
var div = document.getElementById("divResultArea");
var scrollHeight = div.scrollHeight;
var scrollViewHeight = div.scrollTop + div.offsetHeight;
if(scrollHeight <= scrollViewHeight){
div.innerHTML = div.innerHTML + "add! scrollViewHeight : "
+scrollViewHeight + "<br>"
+"add!<br>";
div.scrollTop = div.scrollTop+20;
}
setTimeout("checkTargetScroll()",500);
}
</script>
</head>
<body onload="checkTargetScroll();">
<div id="divResultArea" style="width: 300px;height: 150px;
border: 2px;border-color:rgb(150,150,150);
border-style:solid;overflow: auto;">
test!<br>test!<br>test!<br>test!<br>test!<br>
test!<br>test!<br>test!<br>test!<br>test!<br>
test!<br>test!<br>test!<br>test!<br>test!<br>
</div>
<script type="text/javascript">checkTargetScroll();</script>
</body>
</html>
<<sample>>
test!
test!
test!
test!
test!
test!
test!
test!
test!
test!
test!
test!
test!
test!
test!
test!
test!
test!
test!
test!
test!
test!
test!
test!
test!