javascript TextRange expand( )
@March 15, 2008, 1:22 a.m.
expand( ) | Firefox/Netscape/NN n/a IE 4(Win) Chrome/Safari/DOM n/a |
expand("unit") | |
Expands the current text range (including a collapsed range) to encompass the textual unit passed as a parameter. For example, if someone selects some characters from a document, you can create the range and expand it to encompass the entire sentence in which the selection takes place: var rng = document.selection.createRange( ); rng.expand("sentence"); |
|
If the starting range extends across multiple units, the expand( ) method expands the range outward to the next nearest unit. |
|
Parameters | |
|
|
Returned Value | |
Boolean value: true if method is successful; false if unsuccessful. |
Permanent URL:
http://javascript.gakaa.com/textrange-expand-4-0-5-.aspx
Powered by Linode.