<textarea oninput="autoTextAreaHeight(this)" ></textarea>
function autoTextAreaHeight(o) {
o.style.height = o.scrollTop + o.scrollHeight + "px";
}
<textarea oninput="autoTextAreaHeight(this)" ></textarea>
function autoTextAreaHeight(o) {
o.style.height = o.scrollTop + o.scrollHeight + "px";
}