About the History object of window:
Here are a few ways to use it today:
$ (window). On ('popstate', _popstatehandler); Register throw Log event (History.go (-1));
Window.history.pushState (J.util.parsehash (Ehash), "", ehash);//Add record
Window.history.replaceState (J.util.parsehash (Newhash), "", newhash);//replace the current record
When the image is zoomed in, clicking the Back button will directly fall back to the message list, and the workaround is to create a history record.
(The beginning of the solution is to create an identical (same hash value, no triggering method), and then replace ..., this is the 2B result without in-depth understanding of how the framework is executed ....);
Http://qianduanblog.com/post/html5-pushstate-popstate-history.html
Second offense 2, tap event is not spiritual, because the event source is too small, and the same color as the parent element.
Http://www.cnblogs.com/anginwei/p/4206729.html Good article.
JavaScript variables are assigned, primarily reference types.
Reference type: object and its array,date,regexp,function; Basic Package Type: boolean,number,string.
A reference type passes a pointer, and the basic wrapper type is a copy of the new value pass.
Pay particular attention to the reference type as a parameter, passing the pointer to the argument, or the original variable to the original object
Object changes, the original variable will change
a=[1,2,3]
function Test (b) {b.pop (); B=[4,5,6];console.log (b);}
Console.log (a);//[1,2]
The article mentions the lazy loading
The inertia loading is applicable to the condition that the parameter is invariable, the method needs to change, the main application should be to deal with the compatibility problem;
function Add (flag) {
if (flag) {add=function () {}}else{add=function () {}}
}
Only need to judge once.
2015-01-06 Summary