Visit Mozilla.org

DOM:range.selectNode

From MDC

« Gecko DOM Reference

Contents

[edit] Summary

Sets the Range to contain the node and its contents.

[edit] Syntax

range.selectNode(referenceNode);

[edit] Parameters

referenceNode 
The Node to select within a Range

[edit] Example

range = document.createRange();
referenceNode = document.getElementsByTagName("div").item(0);
range.selectNode(referenceNode);

[edit] Notes

The parent Node of the start and end of the Range will be the same as the parent of the referenceNode.

[edit] Specification

selectNode