function scrollEnd(){
var scrollheight = document.compatMode == "CSS1Compat" ? document.documentElement.scrollHeight :
document.body.scrollHeight;
var clientHeight = document.compatMode == "CSS1Compat" ? document.documentElement.clientHeight :
document.body.clientHeight;
var ScrollTop = document.compatMode == "CSS1Compat" ? document.documentElement.scrollTop :
document.body.scrollTop;
var scrollPos = scrollheight - ScrollTop;
if (clientHeight == scrollPos) { // 스크롤 바가 맨 밑에 위치한다면
alert ("끝까지 확인함!!");
}
<BODY onscroll=scrollEnd();>