selectNodeContents
Sets the Range to contain the contents of a Node.
Syntax
Parameters
The selectNodeContents method takes the following parameters:
Example
range = document.createRange(); referenceNode = document.getElementsByTagName("div").item(0); range.selectNodeContents(referenceNode);
Notes
The parent Node of the start and end of the Range will be the referenceNode. The startOffset is 0, and the endOffset is the number of child Nodes or number of characters contained in the reference node.
Specification
Netscape Communications http://developer.netscape.com |