Javascript Reference
Objects > selection
javascript selection Description
The selection object represents zero or more characters that have been explicitly selected in a document by the user or selected under script cont
javascript selection anchorNode, focusNode
Return a reference to the node where the user started (anchor) and ended (focus) the selection. Most typically, these are text node types. If the se
javascript selection anchorOffset, focusOffset
Return an integer count of characters or nodes from the beginning of the anchor or focus nodes of the selection (see anchorNode and focusNode p
javascript selection isCollapsed
Returns Boolean true if the anchor and focus boundaries of a selection are identical.
javascript selection rangeCount
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 u
javascript selection type
Specifies whether the current selection object has one or more characters selected or is merely an insertion point.
javascript selection typeDetail
This property is supplied as a placeholder for other applications that may use the IE browser component. Such an application can provide additional
javascript selection addRange( )
Turns a Range into a highlighted selection on the page. You can add as many discontiguous ranges to the selection as your application requires. Ea
javascript selection clear( )
Deletes the content of the current selection in a document. For example, the event handler in the following tag deletes any selected text of the p
javascript selection collapse( )
Collapses the current selection to a location specified by the two parameters. Any previously highlighted selection returns to normal display.
javascript selection collapseToEnd( ), collapseToStart( )
Collapses the current selection to a location at the start ( collapseToStart( ) ) or end ( collapseToEnd( ) ) of the selection object. Any previo
javascript selection containsNode( )
Returns Boolean true if the current selection object contains a node passed as a parameter. The second parameter is supposed to let you loosen or
javascript selection createRange( )
Creates a TextRange object from the current selection object. After a statement like the following: var myRange = document.selection.createRange( );
javascript selection createRangeCollection( )
Creates a TextRange collection object. This must be in anticipation of IE supporting multiple, discontiguous selections in the future.
javascript selection deleteFromDocument( )
Removes the current selection from the document tree. The node hierarchy adjusts itself by obeying the same rules as Range.deleteContents( ) .
1-15 / 23 >

Powered by Linode.