length property (comment, CommentNode, TextNode)
To get the contents of the objects mentioned above, use the data property.
You can find the related objects in the Supported by objects section below.
This property is read-only.
Integer that represents the length of the contents.
Default: this property has no default value.
Example HTML code 1:
This example illustrates the use of the length property:
Did you find this example helpful?
User Contributed Comments