Updated: 2005-10-23 01:00:16+0900 - [ HOME ] Download Selection.js Usage var selection = new Selection(document.getElementById("textAreaId")); var s = selection.create(); alert("start:" + s.start + ", end:" + s.end); Example example.html How to create selection from TextRange object. Create marker which is not included in the textarea contents. var marker = notIncludedRandomString(contents); Appen