javascript Range compareNode( )
| compareNode( ) | NN 6 IE n/a DOM n/a | ||||||||||||||
compareNode(nodeReference) | |||||||||||||||
|
A Netscape-only method that returns an integer code indicating the relative position of some other node with respect to the current range. Four plain-language constants are members of every Netscape Range object, and can be used for comparisons of values returned by the compareNode( ) method. Note that the returned values are from the point of view of the node passed as a parameter, rather than from that of the current range. |
|||||||||||||||
Returned values and constants are as follows. |
|||||||||||||||
|
|||||||||||||||
By way of example: if (rng.compareNode(document.getElementById("myElem")) == rng.NODE_INSIDE) {
// process for myElem node being contained by the range
}
|
|||||||||||||||
| Parameters | |||||||||||||||
|
|||||||||||||||
| Returned Value | |||||||||||||||
Integer values 0, 1, 2, or 3. |
|||||||||||||||
1633,Nickname,Homepage or email,Comments here,Add comment
