1//scroll to the bottom of "#myDiv"
2var myDiv = document.getElementById("myDiv");
3 myDiv.scrollTop = myDiv.scrollHeight;
1document.getElementsByClassName('className')[0].scrollTop = document.getElementsByClassName('className')[0].scrollHeight;
1 // scroll to end
2 var scrollDiv = document.getElementById("moveToBottom");
3 scrollDiv.scrollTop = scrollDiv.scrollHeight;