Javascript Reference
Categories: COMMENT

javascript COMMENT text

@March 15, 2008, 1:22 a.m.
textFirefox/Netscape/NN n/a IE 4 Chrome/Safari/DOM 1  

Read/Write  

Provides the text content of the element. Due to the nature of this element, the value of the text property is identical to the values of the innerHTML and outerHTML properties. Changes to this property do not affect the text of the comment as viewed in the browser's source code version of the document. This property is not available in IE 4/Macintosh.

 
Example
 
document.all.tags("!")[4].text = "Replaced comment, but no one will know.";
 
Value

String.

 
Default

None.


Powered by Linode.