how to scroll to bottom of page with javascript code example
Example 1: automatically scroll to bottom of page
window.scrollTo(0,document.body.scrollHeight);
Example 2: javascript detect scroll to bottom of page
function scrolled(e) {
if (myDiv.offsetHeight + myDiv.scrollTop >= myDiv.scrollHeight) {
scrolledToBottom(e);
}
}