| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| </head> | |
| <body> | |
| <p id="description">Focus field with a placeholder, then type.</p> | |
| <div> | |
| <textarea id=i1>Text</textarea> | |
| </div> | |
| <script> | |
| var i1 = document.getElementById('i1'); | |
| i1.focus(); | |
| i1.setSelectionRange(4, 4); | |
| </script> | |
| </body> | |
| </html> |