Platform Support
IE | Mozilla | Netscape | Opera | Safari | no | 1.0+ | no | 7.0+ | 1.0+ |
---|
Constructors
Constructor | Action | IE | Mozilla | Netscape | Opera | Safari | ||
---|---|---|---|---|---|---|---|---|
Comment Constructor() : Comment
Represents a comment in a XML/HTML document.
|
Show Details | no | 1.0+ | no | 7.0+ | 1.0+ | ||
Comment() : CommentRepresents a comment in a XML/HTML document. Returns
|
Inherited Properties
Property | Action | IE | Mozilla | Netscape | Opera | Safari |
---|---|---|---|---|---|---|
data
: String
Character data of the current node.
|
Show Details | no | 1.0+ | no | 7.0+ | 1.0+ |
|
||||||
length
: Number
Length of the content of the data property or substringData method.
|
Show Details | no | 1.0+ | no | 7.0+ | 1.0+ |
|
Inherited Functions
Method | Action | IE | Mozilla | Netscape | Opera | Safari | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
appendData(String arg) : void
Appends the specified string to the node text.
|
Show Details | 6.0+ | 1.0+ | no | 7.0+ | 1.0+ | |||||||||||
Parameters
Returns
|
|||||||||||||||||
deleteData(Number offset, Number count) : void
Deletes the indicated range of text.
|
Show Details | 6.0+ | 1.0+ | no | 7.0+ | 1.0+ | |||||||||||
Parameters
Returns
|
|||||||||||||||||
insertData(Number offset, String arg) : void
Inserts the supplied text at the indicated character offset
|
Show Details | 6.0+ | 1.0+ | no | 7.0+ | 1.0+ | |||||||||||
Parameters
Returns
|
|||||||||||||||||
replaceData(Number offset, Number count, String arg) : void
Substitutes the indicated range of text with the supplied string
|
Show Details | 6.0+ | 1.0+ | no | 8.0+ | 1.0+ | |||||||||||
Parameters
Returns
|
Remarks
Represents the contents of an HTML or XML comment, which begins with the token <!--
and ends with -->
.
The contents of this node are any characters that exist between those two tokens.
Comment
inherits
its capabilities from CharacterData
. See CharacterData
for more information on the methods and
properties available via the Comment
object.
References
Availability
HTML DOM Level 2|W3C