Author Mark ' Tarquin ' wilton-jones • November 2, 2006
This article translates from efficient JavaScript
The address of the original translation http://kb.operachina.com/node/207
Traditionally, web pages don't have a large number of scripts,
Nowadays, popular in Web pages using a lot of JavaScript, we need to find ways to optimize them, make them faster. We use event delegates to make event listeners more efficient, use frequency reduction techniques to limit how many methods are used,
This article introduces the JavaScript implementation Picture Carousel Component, the nonsense does not say more directly to look below:
Effect:
Automatically loop the picture, there is a button below to switch to the corresponding picture.
Objective
For JavaScript, classes are optional (not necessarily) design patterns, and implementing classes in [[Prototype]] languages like JavaScript is lame.
This kind of lame feeling is not just from grammar, although grammar is a very important
Objective
We call these acts events, and response callbacks (callbacks). A continuous flow of events is called the event stream (a stream of events). The speed at which these actions occur is not something we can control manually. But we can
At the end of the semester, tutorial information security Introduction homework. Just encounter the classical cryptography algorithm Playfair algorithm and hill algorithm, using JavaScript language to achieve is in the fun, while Baidu Edge code, by
JS composition
As we all know, javascript there are three components ECMAScript , DOM and, BOM depending on the host (browser), the specific manifestations are not the same, IE and other browser styles are different.
1. DOM is the standard
One, settimeout those things of the single thread
All along, everyone is saying that JavaScript is single-threaded, and that browsers are running JavaScript programs whenever and only one thread.
However, do not know that there is no
JS through the script label default load is synchronized, that is, the first script inside the completion of the JS loading, and then began to load the second, and so on, until all JS files loaded complete. And JS dependency must be in the order of
In a typical object-oriented language, such as Java, there are classes (class) concepts, classes are templates of objects, objects are instances of classes. But in the JavaScript language system, there is no concept of class, JavaScript is not based
Here I briefly talk about the coding problems that are often encountered in front-end HTML and JavaScript daily work.
In a computer, the information we store is expressed in binary code. We know, the on-screen display of English, Chinese characters
For example, a detailed resume information page 1, personal Data 2, work experience 3, project experience 4, other information 4 forms.
The general requirement is to allow the user to submit any one of the forms to the next page for modification
constructor is a special way to initialize a newly created object when memory has been allocated to the object. The object constructor is used to create objects of a particular type – ready objects for use, and the colleague receive constructor can
There are many examples of how JavaScript can realize digital clock effect on the Internet, but this article introduces the digital clock of scrolling effect. Small series think the effect is very dazzle, share below to everybody.
Let's take a look
The implementation of this effect is key to the use of date objects and settimeout.
A total of three examples, HTML structure as follows, do not add CSS style.
Current time:
Countdown to the university Entrance Examination: time
1 Introduction to the use of the Eval function in JavaScript
(2) How to execute global code within a function
► First, the use of eval, the content is relatively simple, familiar can skip.
The Eval function receives an argument s, and if S is not a
Today's JavaScript is no longer a fancy script that has been used as a toy to run on a Web page. JavaScript has become more standardized and widely used as a real programming language for Web development. As a result, more and more people are
We know that the innerHTML attribute with the browser itself can get the value of the string contained in the node, such as the following nodes:
Copy Code code as follows:
i ' m strong
Pass
Copy Code code as follows:
If you want to learn more about EV
For Al and JSON, refer to the following links:
EVal:https://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Global_Functions/Ev Al
JSON:http://www.json.org/
Howthe Ev al function works TheEv al function
Foreign like based on jquery Requirejs,yui Loader,labjs,runjs, the domestic also has the seajs of Taobao, watercress Dojs, these are some very good module loader. But this article will introduce you to a new open source lightweight "multi-threaded"
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