asp.net.ph

Skip Navigation Links

innerText Property

DHTML Object Properties   DHTML Objects


Sets or retrieves the text between the start and end tags of the current object.

Syntax


HTML N/A
Script object.innerText [ = sTxt ]

Possible Values


sTxt String of text.

The property is read/write with no default value.

Remarks

When setting the property, the given string completely replaces the existing content of the object, except for HTML, HEAD, and TITLE elements.

The property can only be set after the document has loaded. If an element is dynamically created using TextRange, innerHTML, or outerHTML, JScript® [ compatible with ECMA-262 language specification ] can be used to handle events for the newly formed tags. VBScript is not supported.

InnerText is read-only on the following objects: HTML, TABLE, TBODY, TFOOT, THEAD, TR.

See Also

innerHTML, insertAdjacentText, outerText, outerHTML



>

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note