Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我认为你需要在附加字符串时滚动到底部。这是我的代码..
$('textarea').on("keyup", function(e) { var val = $('<div/>').html($(this).val()); $(this).val(val.text().replace(/'/g,"’")); $(this).animate({ scrollTop:$(document).height() },1000) });
这里 textarea 设置为滚动。