splitText method

Divides a text node at the specified index.


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