Jump to content



Recommended Posts

hi there, i have something that need your kindly help.given that

var range = document.selection.createRange();

can get the words highed in a HTML document. But, is there a way to know where the user's text-cursor is ?for example, let the words in red are the word that have been highlighted:

The following script segment creates a TextRange object.
then, is there a way to find out the number 5 - the selection starts at the fifth character.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...