This is functionally similar to splitting a String object. The character index, using a zero-based counting scheme where the split is to occur, should be passed as an argument.
The method returns the text to the right of the split. The receiving object is truncated at the split point. You can then append some HTML to the receiving object and then append the text object that was returned by the method.
Prev | Home | Next |
textNode.length | Up | TextRange object |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |