textarea高度自适应

var tx=document.getElementById("tx");
tx.style.height=tx.scrollHeight+"px"
tx.style.backgroundColor="#89bde5"
tx.style.border="none"
tx.style.textDecoration="underline"
原文地址:https://www.cnblogs.com/wiming/p/4651046.html