How to scroll til the end or til the specific element in the table of the website using javascript

Have any javascript method to scroll to the specific element or til the end of a table in a website.
When I used window.scroll, it scrolls the main window, not the table. Anyone got the solution?