HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
The Text object represents the textual content of an element or attribute
The Text object represents the textual content of an element or attribute.
Property | Description |
---|---|
data | Sets or returns the text of the element or attribute |
isElementContentWhitespace | Returns true if the text node contains content whitespace, otherwise it returns false |
length | Returns the length of the text of the element or attribute |
wholeText | Returns all text of text nodes adjacent to this node, concatenated in document order |
Method | Description |
---|---|
appendData() | Appends data to the node |
deleteData() | Deletes data from the node |
insertData() | Inserts data into the node |
replaceData() | Replaces data in the node |
replaceWholeText(text) | Replaces the text of this node and all adjacent text nodes with the specified text |
splitText() | Splits this node into two nodes at the specified offset, and returns the new node that contains the text after the offset |
substringData() | Extracts data from the node |