OLD | NEW |
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 </head> | 4 </head> |
5 <body> | 5 <body> |
6 <p id="description">Focus field with a placeholder, then type, then delete all t
ext.</p> | 6 <p id="description">Focus field with a placeholder, then type, then delete all t
ext.</p> |
7 <div> | 7 <div> |
8 <textarea id=i1 placeholder="Placeholder"></textarea> | 8 <textarea id=i1 placeholder="Placeholder"></textarea> |
9 <script> | 9 <script> |
10 var i1 = document.getElementById('i1'); | 10 var i1 = document.getElementById('i1'); |
11 i1.focus(); | 11 i1.focus(); |
12 document.execCommand("InsertText", false, "Text"); | 12 document.execCommand("InsertText", false, "Text"); |
13 document.execCommand("Delete"); | 13 document.execCommand("Delete"); |
14 document.execCommand("Delete"); | 14 document.execCommand("Delete"); |
15 document.execCommand("Delete"); | 15 document.execCommand("Delete"); |
16 document.execCommand("Delete"); | 16 document.execCommand("Delete"); |
17 </script> | 17 </script> |
18 </body> | 18 </body> |
19 </html> | 19 </html> |
OLD | NEW |