Programmers who are familiar with web development must not be unfamiliar with Ajax. Now there are many JS frameworks that encapsulate Ajax implementations, such as JQuery's Ajax functions, which are very handy to call. Of course this article does
As Web sites become "Internet apps," JavaScript code embedded in Web pages is growing larger and more complex.
Web pages are more and more like desktop programs, need a team division of work, progress management, unit testing and so on ...
As you may know, the execution environment for a JavaScript language is "single-threaded" (single thread).
The so-called "single thread" means that only one task can be completed at a time. If you have more than one task, you must queue, the
Recent development encountered a page pass array to the action background list type, the Received list object is not imagined according to the array element position corresponding to the acceptance, such as the array of 0 bits inserted into the list
Cookies and sessions are commonly used to implement the Http state of the technology, in the continuous use of their own understanding of it. My next discussion is based on the following sequence:
1. Why to use cookies and session
Because the
Brief summary: Apply (): Call the function as a method of the specified object, passed to it is the specified argument array--function.apply (thisobj, args) or function.apply (thisobj, args) Bind (): main function: Bind a function to an object,
Before we talk about the shallow copy and deep copy of JavaScript, we need to discuss the data type of JS. We all know there are five types of number,boolean,string,null,undefined,object. And object also contains Function,array and object itself.
For JavaScript inheritance and prototype chain, although I read the book before listening to the session, but still feel foggy, can not help but sigh JavaScript is really a magical language. After sponsor one-on-one counseling and their own back
only objects in the 1.js, including objects, functions, constants, and so on.
Object without explanation. Functions also have properties, one of the common is prototype. Constants also have attributes:
(3). __proto__;//number {}
2. Prototype of
The UI thread blocking problem caused by synchronous Ajax was encountered and recorded here.
The reason is this, because there are several similar asynchronous request actions on the page, in line with the principle of increasing the reusability of
Recently in writing a CMS Content management system, the front desk is basically using AJAX asynchronous request server, through ASHX processing, return JSON format processing. Because of the need for a more user-friendly interface, so the use of
First, the preface
When too many pictures are requested in a page, and the picture is too large, the speed of the page access is very slow, the user experience is very unfriendly; use the picture lazy load, you can reduce the pressure on the server,
Similar to Taobao details page menu bar Smart positioning for everyone is not unfamiliar! As shown in the screenshot below: That part of the red box!
Basic principle:is to use JS to listen for scrolling events, when the page's scrolling distance (
Factory mode is a more common design pattern in software engineering. This pattern abstracts the process of creating concrete objects.
Code on:
function Createhuman (name,sex) {
var obj = new Object ();
Obj.name = name;
Obj.sex = sex;
Obj.say =
Code rewrite for the factory pattern in the previous chapter
function Human (name, sex) {
this.name = name;
This.sex = sex;
This.say = function () {
alert (this.name);
}
var man = new Human ("Hanwu", "male");
var woman = new Human ("Heavenly Queen"
First code:
function Human () {}
Human.prototype.name = "Genghis Khan";
Human.prototype.sex = "male";
Human.prototype.say = function () {
alert (this.name);
var man = new Human ();
Man.say (); Genghis Khan
var woman = new Human
A common way to create custom types is to use the constructor pattern in combination with the prototype pattern.
The constructor pattern is used to define the specific parts (properties and methods) of the instance object, and the prototype pattern
The dynamic prototyping pattern is to encapsulate all the information into the constructor, and initialize the prototype in the constructors, maintaining the advantage of using constructors and prototypes at the same time.
function Human (name,
Article Introduction: Simple analysis of the jquery principle, the small jacket that clawed the jquery.
Introduction
The LZ is still in the third chapter of the digestive system principle recently, so this part of the content LZ intends
The clothes stacked on the floor
First, let's take a look at Angular-seed, an official entry project for ANGULARJS application development, whose file structure is
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.