Dynamically Scrolling a Textarea
问题 I have a textarea html element on my page that gets reloaded via ajax. The whole textarea is returned each time not just its content, and the content grows over time. Along with the textarea i return the following piece of javascript: <script type=\"text/javascript\" > var textArea = document.getElementById(\'outputTextResultsArea\'); textArea.scrollTop = textArea.scrollHeight; </script> In firefox 3.0.7 this places the scroll bar at the bottom of the textArea, allowing me to see the latest