Text

Team-Fly    

 
Webmaster in a Nutshell, 3rd Edition
By Robert Eckstein, Stephen Spainhour
Table of Contents
Chapter 11.  JavaScript


Text DOM Level 1

A run of text in a document Inherits From: Node

Description

A Text object represents a run of plain text without markup in a DOM document tree. Do not confuse it with the single-line text input element of HTML, which is represented by the Input object.

Properties

data

The string of text contained by this node.

length

The number of characters contained by this node. Read-only.

Methods

appendData( text )

Appends the specified text to this node and returns nothing.

deleteData( offset , count )

Deletes text from this node, starting with the character at the specified offset , and continuing for count characters. Returns nothing.

insertData( offset , text )

Inserts the specified text into this node at the specified character offset . Returns nothing.

replaceData( offset , count , text )

Replaces the characters starting at the specified offset and continuing for count characters with the specified text . Returns nothing.

splitText( offset )

Splits this Text node into two at the specified character position, inserts the new Text node into the document after the original, and returns the new node.

substringData( offset , count )

Returns a string that consists of the count characters starting with the character at position offset .

See Also

Node.normalize( )


Team-Fly    
Top


Webmaster in a Nutshell
Webmaster in a Nutshell, Third Edition
ISBN: 0596003579
EAN: 2147483647
Year: 2002
Pages: 412

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net