Home | Top | Website design | JavaScript Editor | Get Advanced JavaScript and Ajax Editor, Validator and Debugger! 1st JavaScript Editor. |
Sets the Range to contain the contents of a Node.
The selectNodeContents method takes the following parameters:
range = document.createRange(); referenceNode = document.getElementsByTagName("div").item(0); range.selectNodeContents(referenceNode); |
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.
Home | Top | Website design | JavaScript Editor | Get Advanced JavaScript and Ajax Editor, Validator and Debugger! 1st JavaScript Editor. |