|
July 7, 2001 Inserting DOM Strings Tips: July 2001
Yehuda Shiran, Ph.D.
|
|
Internet Explorer 6 is richer in functionality than Internet Explorer 5.5 in its text manipulation support. The insertData() method is one example. Operating on text nodes, it inserts a string to the text node data. You can specify the offset at which to insert, and the data to insert. Here is its syntax:
where:
Let's create a text node at the
and then let's insert Here is the definition of this button:
And here is how the event handler above is defined:
People who read this tip also read these tips: Look for similar tips by subject: |