<html>
<head>
    <script>
    function test() {
        var ta = document.getElementById('ta');
        ta.focus();
        // Send caret to bottom of textarea
        ta.setSelectionRange(ta.value.length, ta.value.length);
        document.execCommand("InsertText", false, '5');
        document.execCommand("InsertText", false, '\n');
        document.execCommand("InsertText", false, '6');
        document.execCommand("InsertText", false, '\n');
        document.execCommand("InsertText", false, '7');
        document.execCommand("InsertText", false, '\n');
        document.execCommand("InsertText", false, '8');
        document.execCommand("InsertText", false, '\n');
    }
    </script>
</head>
<body onload="test()">
This tests that a scrollbar will appear when text overflows the textarea<br>
<textarea rows=6 id="ta">
1
2
3
4
</textarea>
</body>
</html>
