ZVON > References > DOM1 Reference

replaceData (method)

Owning interface and usage:  
CharacterData.replaceData(offset, count, arg)

Member of these other interfaces :  
CDATASection, Comment, Text

Description:  
Replace the characters starting at the specified 16-bit units offset with the specified string.

Parameters:  
unsigned long offset  -  The offset from which to start replacing.
unsigned long count  -  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.
DOMString arg  -  The DOMString with which the range must be replaced.

Returns:  
nothing

Exceptions:  
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.
DOMException NO_MODIFICATION_ALLOWED_ERR
Raised if this node is readonly.


Example:
JavaScript:
  var txt = document.createTextNode('AAA-BBB');
  txt.replaceData(0, 4, 'DDDD');
  var output = txt.data;
Output:
desired your browser
DDDDBBB



_____________________________________________
Reference Search | Sitemap | XML Glossary       ZVON | Systinet




Related sites:
  • dotNet Slackers - Your latest resource for ASP.NET
  • Dotnet Spider - Outsourcing and Offshore software development in India
  • XML - Xselerator, XSL Editor, BizTalk Utilities, XML Tutorials, Learn XML
  • Planet Source Code - The largest public source code database on the Internet
Domain Names conference call service UNLIMITED Web Hosting by HostDepartment Alojamiento Web answering service
MSN VoIP Internettelefonie Hosted Exchange, SDSL VoIP Internettelefonie AT VoIP Internettelefonie DE