0

I need to know what is the use of following code:

var obj=document.selection.createRange();
obj.moveStart('character', count);

From what I understand, obj will have the selected text.

What is moveStart is used for..?

1
  • As you've probably realised, this code is IE specific and will not work in other browsers. Commented Sep 14, 2009 at 9:31

1 Answer 1

2

According to MSDN (http://msdn.microsoft.com/en-us/library/ms536623%28VS.85%29.aspx), that call moves the start of the selection by count characters to the right.

Obj will not be a string by the way, it'll be a TextRange object instance: http://msdn.microsoft.com/en-us/library/ms535872%28VS.85%29.aspx#

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.