“Содержание высоты Textarea” Ответ

Исправить размер Textarea

  resize: none;
Agreeable Alpaca

Содержание высоты Textarea

const textarea = document.getElementById("txt");

textarea.addEventListener("input", function (e) {
  this.style.height = "auto";
  this.style.height = this.scrollHeight + "px";
});
Adventurous Addax

Сделайте автоксацию Textarea

function autoResize() {
	console.log('resizing');
	textInput.style.height = (textInput.scrollHeight) + 'px';
}
MunchDuster

HTML Textarea Auto Height до количества текста

$('textarea').each(function () {
  this.setAttribute('style', 'height:' + (this.scrollHeight) + 'px;overflow-y:hidden;');
}).on('input', function () {
  this.style.height = 'auto';
  this.style.height = (this.scrollHeight) + 'px';
});
Dangerous Dove

Ответы похожие на “Содержание высоты Textarea”

Вопросы похожие на “Содержание высоты Textarea”

Больше похожих ответов на “Содержание высоты Textarea” по JavaScript

Смотреть популярные ответы по языку

Смотреть другие языки программирования