javascript Range endOffset
endOffset | Firefox/Netscape/NN 6 IE n/a Chrome/Safari/DOM 2 | |||||||||||||||||
Read-only | ||||||||||||||||||
Returns an integer count of characters or nodes for the end point's location within the node reported by the endContainer property. If the endContainer is a text node, the endOffset property counts the number of characters to the right of the first character of that text node. If the endContainer is an element node, the endOffset property counts the number of nodes between the start of the containing node's content and the end point. |
||||||||||||||||||
As an example, consider the following document segment that shows a text range in boldface characters, with the start and end points signified by pipe characters: <>One paragraph with |pa<span> nested</spa>| element inside.</p>n |
||||||||||||||||||
Note that the start point is within a text node, while the end point sits just outside the span element end tag. The Range object's properties report values as shown in the following table. |
||||||||||||||||||
|
||||||||||||||||||
Example | ||||||||||||||||||
var rngEndOff = rng.endOffset; |
||||||||||||||||||
Value | ||||||||||||||||||
Integer. |
||||||||||||||||||
Default | ||||||||||||||||||
None. |
Powered by Linode.