outerText property

Sets or retrieves the text of the object.


HRESULT value = object.put_outerText( v);HRESULT value = object.get_outerText(* p);

Property values

Type: BSTR

the text.


The IHTMLElement::outerText property is read-only on the html, tBody, td, tFoot, th, tHead, and tr objects.

When this property is set, the given string completely replaces the original text in the object.

You can set this property only after the HTMLFrameSiteEvents::onload event fires on the window. When dynamically creating a tag using TextRange, IHTMLElement::innerHTML, or IHTMLElement::outerHTML, use Microsoft JScript to create new events to handle the newly formed tags. Microsoft Visual Basic Scripting Edition (VBScript) is not supported.

You can change the value of the title element using the document.IHTMLElement::title property.

To change the contents of the table, tFoot, tHead, and tr elements, use the table object model. For example, use the IHTMLTableRow::rowIndex property or the rows collection to retrieve a reference to a specific table row. To retrieve a reference to a specific cell, use the IHTMLTableCell::cellIndex property or the cells collection. You can add or delete rows using the IHTMLTableRow::insertCell and IHTMLTableRow::deleteCell methods. To change the content of a particular cell, use the IHTMLElement::innerHTML property.

See also