Name
text — NN n/a IE 4 DOM 1
Synopsis
Read/Write
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.
Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.