Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
HTML and CSS
Methods
 moveEnd Method

  Switch on low bandwidth view
moveEnd Method

Changes the end position of the range.

Syntax

iMoved = object.moveEnd(sUnit [, iCount])

Parameters

sUnit Required. String that specifies the units to move, using one of the following values:
character
Moves one or more characters.
word
Moves one or more words. A word is a collection of characters terminated by a space or some other white-space character, such as a tab.
sentence
Moves one or more sentences. A sentence is a collection of words terminated by a punctuation character, such as a period.
textedit
Moves to the start or end of the original range.
iCount Optional. Integer that specifies the number of units to move. This can be positive or negative. The default is 1.

Return Value

Integer that returns the number of units moved.

Remarks

This feature might not be available on non-Microsoft Win32 platforms.

Standards Information

There is no public standard that applies to this method.

Applies To

TextRange, TextRange Constructor

See Also

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Moving Text Range      Chuck Lowery   |   Edit   |   Show History
Moving either the moveStart will effect move end. End position may not be behind the start position. If ,oveStart is move to a position within a textarea moveEnds value will also move to that place if it has not been set e.g.

var range = document.getElementById("aTextArea").createTextRange();

range.collapse(true);

range.moveStart('character', offsetIntoTextarea);

range.moveEnd'character', offsetPassedStart);

range.select();


Tags What's this?: Add a tag
Flag as ContentBug
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker