This using Pure JavaScript Code.
function auto_grow(element) {
element.style.height = "5px";
element.style.height = (element.scrollHeight)+"px";
}
textarea {
resize: none;
overflow: hidden;
min-height: 50px;
max-height: 100px;
}
<textarea oninput="auto_grow(this)"></textarea>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…