How do you scroll to the bottom of a text area in javascript? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

How do you scroll to the bottom of a text area in javascript?

I've tried multiple times to do this but it doesnt seem to work. All I see online is about a scroll to top of page but nothing about scrolling to the bottom of an object, preferably a textarea https://code.sololearn.com/WbtvW2Ih2bgJ/?ref=app

17th Mar 2020, 9:29 PM
Zachary Mullis
Zachary Mullis - avatar
1 Answer
+ 1
Okay, found out how to scroll to the exact bottom. But thanks for(var i = 0; i < 99999; i++) { event.preventDefault(); document.getElementById("log_").scrollIntoView({ block:"end"}); }
17th Mar 2020, 11:20 PM
Zachary Mullis
Zachary Mullis - avatar