Text Object
The insertData() method inserts data to a text node.
| Parameter | Description |
|---|---|
| start | Required. Specifies where to begin inserting characters. Start value starts at zero |
| string | Required. Specifies the string to insert |
The following code fragment loads "books.xml" into xmlDoc using loadXMLDoc() and inserts a string to the text node of the first <title> element:
Output:
Text Object
Your message has been sent to W3Schools.