$('textarea').each(function () {
this.setAttribute('style', 'height:' + (this.scrollHeight) + 'px;overflow-y:hidden;');
}).live('change', function () {
this.style.height = 'auto';
this.style.height = (this.scrollHeight) + 'px';
});
<textarea rows="1">内容</textarea>