|
February 4, 2001 Splitting DOM Nodes Tips: February 2001
Yehuda Shiran, Ph.D.
|
|
Netscape 6 is as rich as Internet Explorer as far as text node splitting is concerned. The splitText() method splits a text node into two text nodes. The new text node becomes a sibling immediately following the original text node. You can specify how to split the characters into the two text node:
where:
Let's create a text node at the
and then let's split the text node into two text nodes, leaving 15 characters in the first text node. Click this button to get it done in Netscape 6 and Internet Explorer 5.5 (the first text node is Here is the definition of this button:
Here is how we define the function
People who read this tip also read these tips: Look for similar tips by subject: |