Javascript Reference
Categories: COMMENT

javascript COMMENT Description

@July 28, 2009, 8:49 a.m.
comment, Comment Firefox/Netscape/NN 6 IE 4 Chrome/Safari/DOM 1  

 

  

The comment object reflects the ! element in an HTML document. But in a W3C DOM environment, such as Netscape 6, this object is not a genuine element in the context of the W3C DOM abstract model. Instead, the object is simply a special kind of node. Such a node has a nodeType value of 8, which identifies it as a Comment node. A Comment node has the following inheritance chain in the DOM abstract model: Node->CharacterData->Comment. While a Comment node has special values automatically assigned to some of its properties (such as nodeValue), a Comment node has no properties or methods beyond the ones inherited from the Node and CharacterData objects. Node properties and methods are discussed earlier among the shared items; CharacterData properties and methods are covered in detail with the Text object, which also inherits from CharacterData, and is more likely to be scripted.

 

To reference a comment element, use relative element or node properties. While IE provides an id property by virtue of its inheritance model, you cannot assign an identifier to the element via an id attribute. Such an element in IE does, however, have a tag name value of !. Therefore, you can reference an IE HTML comment element via the collection of elements returned by the document.all.tags("!") method.

 
HTML Equivalent
 
<!--comment text-->
 
Object Model Reference
 
nodeReference
 
Object-Specific Properties
 
data length text
 
Object-Specific Methods
 
appendData( ) deleteData( ) insertData( ) replaceData( )
substringData( )      
 
Object-Specific Event Handler Properties

None.

order atorvastatin pill <a href="https://lipiws.top/">atorvastatin 80mg canada</a> order atorvastatin 40mg pills
Nrnyge - 1 months
Under moderation.
AxmedVaL1977 - 2014-07-10
Under moderation.
AsaseetVaL1969 - 2014-07-01

Powered by Linode.