data property (comment, CommentNode, TextNode)
The nodeValue property is identical to the data property for the CommentNode and TextNode objects.
You can find the related objects in the Supported by objects section below.
This property is read/write.
String that specifies or retrieves the text content of the object.
Default: this property has no default value.
Example HTML code 1:
This example illustrates the use of the data property:
Did you find this example helpful?
User Contributed Comments