Home > Article > Web Front-end > How to get nodes such as brothers and parent classes in js_javascript skills
var chils= s.childNodes; //Get all the child nodes of s
var par=s.parentNode; //Get the parent node of s
var ns=s.nextSbiling; // Get the next sibling node of s
var ps=s.previousSbiling; //Get the previous sibling node of s
var fc=s.firstChild; //Get the first one of s Child node
var lc=s.lastChile; //Get the last child node of s