Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to automatically Scroll a text window on loading it

I have a html text box with scroll. Is it possible to get the box to scroll to a certain point on loading ?

like image 419
Michael Goebel Avatar asked Mar 24 '26 11:03

Michael Goebel


1 Answers

You can use scrollTop

document.getElementById('your_div_id').scrollTop = 50;
like image 51
Khoa Nguyen Avatar answered Mar 25 '26 23:03

Khoa Nguyen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!