javascript Node nextSibling, previousSibling
| nextSibling, previousSibling | NN 6 IE 5 DOM 1 |
| Read-only | |
|
Return a reference to the next or previous node (respectively) in the document tree at the same nested level as the current node. If there is no node in the position indicated by the property name, the property returns null. For a lone text node inside an element node, both properties return null. Node sequence is determined intially by source code order, but script changes to the document tree are reflected in the nodes returned by these properties. |
|
| Example | |
var nextNode = document.getElementById("elementID").nextSibling;
|
|
| Value | |
Node object (including text node, HTML element node, etc.) reference. |
|
| Default | |
null |
|
Previous: javascript Node nodeName
1330,Nickname,Homepage or email,Comments here,Add comment
