Easy Tutorial
❮ Prop Attr Prefix Met Comment Replacedata ❯

XML DOM textContent Property



Definition and Usage

The textContent property sets or returns the text content of an attribute.

Syntax


Example

The following code snippet uses loadXMLDoc() to load "books.xml" into xmlDoc and returns the text content of the category attribute:

Example

Output:

COOKING
CHILDREN
WEB
WEB

Try It

textContent - Set the text content of an attribute


❮ Prop Attr Prefix Met Comment Replacedata ❯