<html>
<head>
<script>
function selectSpan() {
var selection = window.getSelection();
var range = document.createRange();
range.setStartBefore(document.getElementById('selectSpan'));
range.setEndAfter(document.getElementById('selectSpan'));
selection.addRange(range);
return "";
}
</script>
</head>
<body>
findMe some text
<br>
<span id="selectSpan">select this text</span>
some text.. find .. find ..
<br>
more text findMe and text.
<br><br><br>
<div id="log"><div>
</body>
</html>