OLD | NEW |
(Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script> |
| 4 function selectSpan() { |
| 5 var selection = window.getSelection(); |
| 6 var range = document.createRange(); |
| 7 range.setStartBefore(document.getElementById('selectSpan')); |
| 8 range.setEndAfter(document.getElementById('selectSpan')); |
| 9 selection.addRange(range); |
| 10 return ""; |
| 11 } |
| 12 </script> |
| 13 </head> |
| 14 <body> |
| 15 findMe some text |
| 16 <br> |
| 17 <span id="selectSpan">select this text</span> |
| 18 some text.. find .. find .. |
| 19 <br> |
| 20 more text findMe and text. |
| 21 <br><br><br> |
| 22 <div id="log"><div> |
| 23 </body> |
| 24 </html> |
OLD | NEW |