the DOM operation of JS
Dom:document Object Model
Bom:bowers (browser) Object Model
Find the element: Var A=document.getelementbyid ("id"), put the found element in the variable;
ID selector: document.getElementById ("id"), according to the ID, find at most one;
Class selector: Document.getelementclassname ("name"), according to ClassName, find out the array;
Tag Selector: document.getelementtagname ("name"), based on the name of the tag, find the array;
Name selector: document.getelementbyname ("name"), based on name, finds the array;
Operating content: InnerHTML tags in the code and text are obtained;
InnerText can only take text;
Operation Properties: Var A=document.getelementbyid ("id");
A.setattribute ("attribute name", "attribute value"); Set a property that can be added or changed;
A.getattribute ("attribute name"); Gets the value of the property;
A.removeattribute ("attribute name"); remove an attribute;
Operation style: A.style. style = "";
Animation
CSS transitions (gradient effect)
JS setinterval
Clearinterval
CreateElement:
var op = createelement ("label name")
Op. properties
Appendchild:appendchild (object name): Op
RemoveChild
onchange: Changing Events
JS DOM manipulation and animation