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 );