1//scroll to the bottom of "#myDiv"
2var myDiv = document.getElementById("myDiv");
3 myDiv.scrollTop = myDiv.scrollHeight;
1
2 var elmnt = document.getElementById("content");
3
4function scrollToTop()
5 {
6 elmnt.scrollIntoView(true); // Top
7}
8
9function scrollToBottom() {
10 elmnt.scrollIntoView(false); // Bottom
11}