is it possible I could use charAt function within function get selection as below?
getSelected function () {
var userSelection;
if (window.getSelection) {
userSelection = window.getSelection ();
} else if (document.selection) {
userSelection = document.selection.createRange ();
}
userSelection return;
}
eg : i have a whole text welcome to stack over flow, then the selected text is stack. can i make a function to get specified position with charAt when user select the text and system will compare it with all the text,if system found the same text, system will return the position??
because in my knowledge charAt function can be used to determine the specific position of the string .. http://help.dottoro.com/ljetnrhv.php#charAt