using Javascript, it is easy to programatically select the text inside a textarea or input text element. How about for
<span>The quick brown fox jumps over the lazy dog</span>
is it possible to use JavaScript to select the words “quick brown fox”? Or select the whole sentence?
Courtesy of http://www.sitepoint.com/forums/showthread.php?t=459934