Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 25. Client-Side JavaScript Refer... > CharacterData.substringData( ): extr...

CharacterData.substringData( ): extract a substring from a Text or Comment nodeDOM Level 1 Core:

Synopsis

String substringData(unsigned longoffset,
                     unsigned long count)
    throws DOMException;

Arguments


offset

The position of the first character to be returned.


count

The number of characters in the substring to be returned.

Returns

A string that consists of count characters of the Text or Comment node starting with the character at position offset.

Throws

This method may throw a DOMException with one of the following code values:


INDEX_SIZE_ERR

offset is negative or greater than the length of the Text or Comment node, or count is negative.


DOMSTRING_SIZE_ERR

The specified range of text is too long to fit into a string in the browser's JavaScript implementation.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint