文本框根据内容自动换行

文本框中添加以下js事件就可以了.
onpropertychange="this.style.height = this.scrollHeight + 3 +'px';"
oninput="this.style.height = this.scrollHeight + 3 + 'px';"