Eighth Chapter
1. Small Knowledge points :
① Some browsers will be based on DOCTYPE to determine the page rendering mode (Standard mode/Strange mode-also known as compatibility mode);
Compatibility mode means that the browser will mimic the bizarre behavior of older browsers to get the old site running, and the nonstandard page to run.
you should avoid the departure compatibility mode when using.
HTML5 doctype default is the standard mode
②ABBR tags-abbreviation, abbreviation. this label to IE7 is only supported by IE
2. JS can only enrich the content of the document, avoid using DOM technology to create core content.
Avoid using DOM to set important styles
Nineth Chapter
1.CSS is using pseudo-classes (for example: hover,: Foucs, after) to enter the DOM's territory;
For example, ① often uses the following pseudo-class to insert small icons.
② See today a move into the image of the mouse to enlarge the effect is through: HOVER+CSS3 scale to achieve:
http://www.9miao.com/
2. each element in the document is an object. The style property of each element is also an object . So when you get the inline style, write: The Color property of the Element.style.color style object.
A style object can only get styles between the lines of an element and cannot get an external style. Style can also be set.
To get an external style, you can use:
window.getComputedStyle? window.getComputedStyle (element, False). Property: Element. Currentstyle. Properties
3. Using table for layout may not be good, but using table to display tabular data is a good idea.
4. For the hyphen attribute name in CSS, the DOM uses a camel-like notation, such as font-size. The DOM writes FontSize.
5. Digression: ① "If you have a hammer on your phone, everything you see is like a nail."
② technology, sometimes or most, is in the service of business interests. Based on the browser wars of those years, now we, as front-end, have to consume our time to do what the user seems to have to modify.
6.classname①= Replace Class
②+= New Class
7. Function Abstraction:
① The original function works fine, but the programmer always wants to change it. Say for the later maintenance convenience or for the code is not low. Refactoring is sometimes a happy thing, at least I now feel it occasionally. It's a good experience to streamline the ugly code that was written earlier into a seemingly good, versatile function. It feels like the illusion that life can be repeated. I hope those who think of refactoring as a dead god don't squirt me, it's just a little rookie's sense of self when they simply refactor their code.
② to abstract a specific function into a general function is called abstraction.
JavaScript DOM Programming Art-Learning Notes (chapters eighth, Nineth)