本篇文章记录一下vue\js实现textarea的滚轴在最下方底部的方案。
此方案必须依赖jquery库
vue\js实现textarea滚动条位置始终在最下方的代码
var height=$("#textarea")[0].scrollHeight;
$("#textarea").scrollTop(height);
html代码
<textarea id="textarea" name="textarea" />
本篇文章记录一下vue\js实现textarea的滚轴在最下方底部的方案。
此方案必须依赖jquery库
vue\js实现textarea滚动条位置始终在最下方的代码
var height=$("#textarea")[0].scrollHeight;
$("#textarea").scrollTop(height);
html代码
<textarea id="textarea" name="textarea" />