javascript TextRange moveEnd( ), moveStart( )
@May 24, 2008, 11:54 a.m.
moveEnd( ), moveStart( ) | Firefox/Netscape/NN n/a IE 4(Win) Chrome/Safari/DOM n/a |
moveEnd("unit"[, count]) moveStart("unit"[, count]) |
|
Moves only the end or start point (respectively) of the current text range by one or more units. An optional parameter lets you specify both the number of units and direction. To shift the start point of a text range toward the beginning of the original range, be sure to specify a negative value. When moving the end point forward by word units, be aware that a word ends with a whitespace character (including a period). Therefore, if a findText( ) method sets the range to a found string that does not end in a space, the first moveEnd("word") method moves the ending point to the spot past the space after the found string rather than to the following word. |
|
Parameters | |
|
|
Returned Value | |
Integer of the number of units moved. |
Can i have an example of this properties??
I want see an example of the use of optional interger... the second case! :)
Tnks!!
I want see an example of the use of optional interger... the second case! :)
Tnks!!
Darius
- 2008-12-12
Powered by Linode.
moveEnd("word",1);
moveEnd("word",20);
moveEnd("word",-5);