Javascript Reference
Categories: Range

javascript Range setEnd( ), setStart( )

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

setEnd(nodeReference, offset) setStart(nodeReference, offset)

  

Establish the document tree locations for the individual boundary points of an existing Range object. Similar to the IE TextRange object's setEndPoint( ) method. The mapping of a location relies upon a node reference and an offset value relative to that node's starting point and type. Offset values count child nodes when the nodeReference is an element node; they count characters when the nodeReference is a text node. To set a boundary at a node edge, the associated methods (setEndAfter( ) and three others) are more convenient.

 
Parameters
 
  • Reference to any element or text node in the document tree.
  • Integer offset, counting either nested nodes within an element or characters within a text node.
 
Returned Value

None.


Powered by Linode.