Javascript Reference
Categories: selection

javascript selection rangeCount

@March 15, 2008, 1:22 a.m.
rangeCountFirefox/Netscape/NN 6 IE n/a Chrome/Safari/DOM n/a  

Read-only  

Returns an integer count of Range objects (which may be discontiguous in Netscape 6) within the span of the selection. A manual selection by the user always contains one Range, but the addRange( ) method can tack on multiple, discontiguous ranges to the selection. To inspect each highlighted section's properties, use the getRangeAt( ) method.

 
Example
 
var howMany = selectionRef.rangeCount;
 
Value

Integer.

 
Default

0


Powered by Linode.