Programmer's Guide > Interfaces > W3C CharacterData interface > replaceData method
  
replaceData method
Replace the characters starting at the specified 16-bit unit offset with the specified string.
replaceData(offset, count, arg)
Parameters
unsigned longoffset
The offset from which to start replacing.
unsigned longcount
The number of 16-bit units to replace. If the sum of offset and count exceeds length, then all 16-bit units to the end of the data are replaced; (i.e., the effect is the same as a remove method call with the same range, followed by an append method invocation).
Stringarg
The DOMString with which the range must be replaced.
Returns
void
Throws
DOMException
INDEX_SIZE_ERR: Raised if the specified offset is negative or greater than the number of 16-bit units in data, or if the specified count is negative.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.