Date: 2015-12-04
JS prototypes: Closures: Closures This is a rather complicated thing ... Now preliminary understanding;
http://segmentfault.com/a/1190000000652891
Closures have three features: 1. function nesting function 2. External parameters and variables 3 can be referenced inside the function. Parameters and variables are not recycled by garbage collection mechanism
JS modularity:a link:JavaScript Modular Programming (a): The notation of the module;There are more complicated things in the back, look again next time;determine the object type: typeof is not an object or a type, otherwise the ToString () method returns a value, but it is still not possible to determine the custom class;
——————————————————————————————————————————————————————————
Client JS section:
Defer property: Continue parsing and HTML document and delay execution of the script until a script that cannot be deferred is encountered;
Functional testing (Troubleshooting incompatibilities): Example: if (element.addeventlistener) {}else if (element.attachevent) Else ... ;
Condition Test: Example: a section in bootstrap
<!--[if Lt IE 9]>
<script src= "//cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js" ></script> <script src= "//CD N.bootcss.com/respond.js/1.4.2/respond.min.js "></script><! [endif]-->;
JS's role is to increase the expressiveness of information, not to be responsible for the performance of information. An important principle is to design the code so that even if the JS interpreter is closed, the Web page that uses it can work.
<noscript> Mark;
OnLoad handle: After the document is parsed, the script runs, and all the secondary content is loaded, and the browser launches the OnLoad event.
OnUnload: The user leaves the Web page;
In documents that contain larger images or many images, the main document can be parsed well before the image is loaded into the OnLoad event trigger. In this case, you might want to manipulate the document before onload. One technique is to put the operation code at the end of the document. An IE-specific technique is to put the document manipulation code in a <script> tag that has both a defer attribute and a src attribute. A Firefox-specific technique is to use the document manipulation code as an event handle for an Domcontentload event that is not described in detail, and the event starts when the document is parsed and external objects such as images are not fully loaded.
Homologous policy: protocol, host, URL interface of loading document;
Cross-domain: modify domain;
Some other methods: http://www.cnblogs.com/2050/p/3191744.html; look after the collection;
Cross-site scripting (XSS): A class of security issues;
Get window, screen, browser information:;
The JavaScript authoritative guide reading notes (ii)