Agent Mode description Description: As the name implies is to use a class to replace another class to perform the method function, this pattern is somewhat similar to the decoration pattern, not the same, the proxy mode is to initialize the proxy
Decorator Mode description Description: A class to dynamic to another class of functional objects before or after the modification, to add some additional functions; This is the decoration of the function of a class object, the decorated class with
JavaScript scopes are the accessible scope of variables and functions.
1. Variable Scope
In JavaScript, variable scopes are divided into global scope and local scope.
Global scope
You can define a variable with global scope Anywhere
1.
Prototype mode: Each create a function has a prototype attribute, it is a pointer to an object;
How the prototype mode creates the function:
function Movie () {};Movie.prototype.name=
In the array operation will often encounter the problem of removing duplicates, the following is a brief introduction to the method of array, and its execution efficiency
Method OneUsing two loopsPrinciple: Take the current and the back of the
Although mostly done on the back end, however, because some of the time to write the front of the interface, so I learned the next jquery and Ajax knowledge, although this writing for the front of the great God for some of the feeling of teaching,
First, you need to know the general usage of jquery.deferred, and then let's get to the point:
Library code:
/*! * multithreaded asynchronous queues * rely on the jQuery 1.8+ (if you are using 1.6 or 1.7, simply replace the then method in the
When I was reading this article, I was reading "Dark Time" written by Mr. Liu Weipeng, and if you are lucky enough to see this blog, I hope you can also read this book. All right, gossip less, get to the point.The idea of generics and polymorphism
In S. For, you can traverse the dominant property of an object or array, which means that our own defined attributes are traversed, and those that are already on the prototype are the ones that are available by default, such as:
Some time ago the company made a relatively large project, need to use OCX control, I plant most of the projects are used C#.net, and WinForm program with OCX control interface is relatively simple, but the JavaScript call OCX interface, but and
Work a few days ago to write the front-end JS code, encountered a traversal element to add click events to it. This is the question that has kept me tuned for a whole afternoon. Finally, go home from work, the Internet to find out how to solve the
What is cross domain? Why do you want to implement Cross-domain?
This is because JavaScript, for security reasons, does not allow you to call objects across domains for other pages. This means that only resources from the same domain can be
Referencing a type in JavaScript is a data structure that is organized together. It is also often called a class, but there is no concept of class in JavaScript. Although JavaScript is an object-oriented language, it does not have the basic
Closures have been heard in the first contact with JavaScript. The first thing to be clear is that it does not understand complexity, and it is very useful. So what are the basics before we get to know about closures? I personally think that the
In fact, the beginning of a set of JS not how to use the object, generally used Func,func,func But with a lot of it, feel the code is not beautiful, but also to package a function, where the package a function, or has been a function call, not
JS to achieve segmentation effect, in order to familiarize themselves with JS writing, pure JavaScript scripting
Briefly introduce several functions:
The role of the SetCapture () function is to send the subsequent mouse events to this object,
My last blog title is wrong, causing some misunderstanding. I think the purpose of blogging is not to recite textbooks, but to share research and development experience. My last title was changed to "one of the topics of JavaScript closures: its
The prototype mode specifies the type that needs to be created through the instance object, which is essentially different from the factory method pattern, where the factory method pattern is defined by the inheritance of the class to create
Took part in Baidu Internship interview, the interviewer asked a question about JS closure. Here's a quick look at the closure and its cost.Closures have many interesting uses, and the two features of JavaScript make it so interesting: 1. A function
Introduction
Control sub page in parent page
Control parent page in sub-page
First, a primer
Let's take a look at an example, there are two pages, 1.html embedded 2.html through the IFRAME, two pages are the same domain
1.html
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.