thepip3r thepip3r - 1 year ago 80
HTML Question

Div Overflow Scroll-to-bottom: Is it possible?

If I have a

so that it is a scrollable
and I load it with information that makes a significant scroll area, is there a way that when I load the information, the
shows the bottom results? Or essentially scrolls to the bottom?

I've seen jQuery solutions but this is for use in an HTA so I cannot use jQuery. Is there a purely javascript way to accomplish this?

Answer Source
document.getElementById('mydiv').scrollTop = 9999999;

The scrollTop property specifies the scrolling offset in pixels from the top of the region. Setting it to a very large value will force it to the bottom.