2015-01-06 Summary

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.