<!DOCTYPE html>
<html>
<body>
<textarea name="mytextarea" cols="10" style="overflow-y:hidden;height:20px;" onpropertychange="this.style.height=this.scrollHeight+'px';" οninput="this.style.height=20+'px';this.style.height=this.scrollHeight+'px';"></textarea>
</body>
</html>