Objective:
After getting an element node, it is often necessary to move up and down, left and right, at the element node to get the other element nodes.
1. Get through parent node
Parentobj.firstchild: Gets the first child node of a known node, which can be used recursively.
Parentobj.lastchild: Gets the last child node of a known node, or it can be used recursively.
2. Get through neighbor nodes
Neigbournode.previoussibiling: Gets the previous node of the same level of the known node.
Neigbournode.nextsibiling: Gets the next node at the same level of the known node.
3. Get through child nodes
Childnode.parentnode: Gets the E-parent node of the known node.
Example
<%@ page language= "C #" autoeventwireup= "true" codebehind= "Default.aspx.cs" inherits= "Ui._default"%><! DOCTYPE html>
Document Object Model (DOM) series two: moving between DOM elements