Javascript Reference
Categories: selection

javascript selection collapse( )

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

collapse(nodeReference, offset)

  

Collapses the current selection to a location specified by the two parameters. Any previously highlighted selection returns to normal display.

 
Parameters
 
  • Reference to a text or element node in the document tree in which the collapsed selection should move.
  • Integer count of characters or nodes within the nodeReference node where the collapsed selection should move. The count is relative to the start of the node. Units are character for text nodes, nodes for elements.
 
Returned Value

None.


Powered by Linode.