When my site loads, how do I use JavaScript to select a specific set of text in a <div>
(not an <input>
field). Not just highlighted, but selected.
I feel this should be a REALLY easy thing to Google, but I'm failing miserably. I've found a LOT of info on how to do it for an input box. And LOTS of info on how to do it with jQuery. But, I am learning JavaScript, and don't want to learn jQuery yet.