ExpandingTextarea is a jQuery plugin that turn a textarea into an expanding one that dynamically resize itself to fit the content of text inside.
Load jQuery and the plugin
<script src="jquery.min.js" type="text/javascript"></script>
<script src="jquery.exptextarea.js" type="text/javascript"></script>
Now you can select a text area using jQuery selector and turn it into an expandable one
<textarea></textarea>
<script>
$('textarea').expandingTextArea();
</script>
Take a look here for a live example