Home | Top | Free Ajax Editor | JavaScript Editor | Get Advanced JavaScript and Ajax Editor, Validator and Debugger! 1st JavaScript Editor. |
Expands the range so that partial units are completely contained.
Syntax
bSuccess = TextRange .expand( sUnit )Parameters
sUnit | Required. String that specifies the units to move in the range, using one one of the following values:
|
Return Value
Boolean that returns one of the following values:
true | The range was successfully expanded. |
false | The range was not expanded. |
Remarks
This feature might not be available on non-Microsoft® Win32® platforms.
Example
This example creates a range from the current selection and uses the expand method to ensure that any word partially enclosed in the range becomes entirely enclosed in the range.
var rng = document.selection.createRange(); rng. expand ("word");Standards Information
There is no public standard that applies to this method.
Applies To
|
TextRange |
Home | Top | Free Ajax Editor | JavaScript Editor | Get Advanced JavaScript and Ajax Editor, Validator and Debugger! 1st JavaScript Editor. |