<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
</head>
<body style="height: 3000px">
<script>
onscroll = function(){
var scrollHeight = Math.max(
document.body.scrollHeight, document.documentElement.scrollHeight,
document.body.offsetHeight, document.documentElement.offsetHeight,
document.body.clientHeight, document.documentElement.clientHeight
);
if(window.scrollY >= scrollHeight - innerHeight) alert('Конец прокрутки');
};
</script>
</body>
</html>
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.