Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

splitText method

Divides a text node at the specified index.

Document Object Model (DOM) Level 3 Core Specification, Section 1.4


IHTMLDOMNode retVal = object.splitText(offset);


offset [in, optional]

Type: long

A long that specifies the index of the string that indicates where the separation occurs. If a value is not provided, a new text node with no value is created.

Standards information


The text node that invokes the IHTMLDOMTextNode::splitText method has a IHTMLDOMAttribute::nodeValue equal to the substring of the value, from zero to offset. The new text node has a IHTMLDOMAttribute::nodeValue of the substring of the original value, from the specified index to the value length. Text node integrity is not preserved when the document is saved or persisted.

See also




Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft. All rights reserved.