Childnodes attribute: returns an array containing all the child elements of the given element node.
Childtype attribute: The returned array contains all types of nodes.
Nodevalue attribute: changes the value of a text node.
Firstchild and lastchild attributes: whenever and wherever you need to access the first element of the childnodes [] array, you can write it as firstchild.
Node. firstchild is equivalent to node. childnodes [0].
Likewise
Node. lastchild is equivalent to node. childnodes [node. childnodes. Length-1]
Chapter 5 JavaScript programming principles and good habits
Reserved return route
Separating Javascript
Backward compatibility
Chapter 6
Bind multiple JavaScript Functions to the onload event handler
Function addloadevent (func ){
Varoldonload = Window. onload;
If (typeof window. onload! = 'Function '){
Windows. onload = func;
}
Else {
Window. onload = function (){
Oldonload ();
Func ();
}
}
}
Call Method
Addloadevent (method name );
Addloadevent (method name );