OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script> | 3 <script> |
4 function test() { | 4 function test() { |
5 var ta = document.getElementById('ta'); | 5 var ta = document.getElementById('ta'); |
6 ta.focus(); | 6 ta.focus(); |
7 // Send caret to bottom of textarea | 7 // Send caret to bottom of textarea |
8 ta.setSelectionRange(ta.value.length, ta.value.length); | 8 ta.setSelectionRange(ta.value.length, ta.value.length); |
9 document.execCommand("InsertText", false, '5'); | 9 document.execCommand("InsertText", false, '5'); |
10 document.execCommand("InsertText", false, '\n'); | 10 document.execCommand("InsertText", false, '\n'); |
(...skipping 10 matching lines...) Expand all Loading... |
21 This tests that a scrollbar will appear when text overflows the textarea | 21 This tests that a scrollbar will appear when text overflows the textarea |
22 <br> | 22 <br> |
23 <textarea rows=6 id="ta"> | 23 <textarea rows=6 id="ta"> |
24 1 | 24 1 |
25 2 | 25 2 |
26 3 | 26 3 |
27 4 | 27 4 |
28 </textarea> | 28 </textarea> |
29 </body> | 29 </body> |
30 </html> | 30 </html> |
OLD | NEW |