Document Object
The createComment() method creates a comment node.
This method returns a Comment object.
| Parameter | Description |
|---|---|
| data | A string that specifies the data for the node |
The following code fragment loads "books.xml" into xmlDoc using loadXMLDoc() and adds a comment node to the <book> element:
Document Object
Your message has been sent to W3Schools.