1 //获取id为textarea的滚动条高度 2 var top = $("#textarea")[0].scrollHeight; 3 //滚动条滚动到最下方 4 $("#textarea").scrollTop(top);
js文本框自动写数据时滚动条始终保持在最下方
原文:https://www.cnblogs.com/Bud-blog/p/12869863.html