1 Currentstyle can get the inline style, but incompatible with other browsers with getComputedStyle (div,null) This IE low-level version is incompatible;
if (Div.currentstyle) {
}
else{}
Composite style (background) with single style (width)
Currentstyle cannot take compound styles
2 extract Link's href:olink[' href ']=this.id+ ". css";
3 The length of the array can be written
. Shift () Remove from the head. Unshift (). push ()
. Splice (start, number) remove from middle
Sort () array sorting string
Sort () to arrange numbers.
Arr.sort () {
function (N1,N2) {
Return N1-N2
}
}
4getElementsByTagName ("label") [0] only add [0] to make
5.removeAttribute ("") Delete a property for click Reset Properties
6charAt instead of square brackets to extract characters under IE6 compatibility
7offsetleft\offsetwidth
Dom
9 children is just an element without bugs, instead of Childnodes[i].nodetype
10parentNode parent Node
OffsetParent parent node with positioning
11creatElements
AppendChild () First delete the element from the original parent
Add to new Parent
JSON array
JSON={A:12,B:5,C: "ABC"}
json.b++
B=6
Json{"A"}
ARR[0]
Offsetwidth has a bug with any border element and uses GetStyle () to get the element attributes
15prototype CSS-like class, Add Method Array.prototype.fangfa=function () {} to a group of objects
Adding attributes with constructors
Using a prototype plus method
16 object-oriented simple with JSON,
Not suitable for multiple objects
There's only one in the whole program, it's easier to write.