Document directory
I. What is JavaScript?
Ii. Start of JavaScript programming
Iii. Implementation basics of JavaScript
Iv. Summary of this Chapter
From the beginning of college, I began to learn how to create web pages and began to access Javascript. Now I just feel that Ja
Javascript: traversing the prototype chain, calling stack, and scope chain
In JavaScript, there are three common chain structures: prototype chain, call stack (Call StackScope chain. This article does not want to talk about the basic knowledge of these concepts, but rather shows how to traverse the three chain structures to deepen understanding. Traverse prototype chain
In
The script in the HTML must be between the tags.The script can be placed in the JavaScript Functions and EventsThe JavaScript statements in the example above will be executed when the page loads.In general, we need to execute code when an event occurs, such as when a user taps a button.If we put JavaScript code in a function, we can call it when the event occurs
JavaScript optimization and development tips and tips
I. Network Optimization
YSlow has 23 rules. For Chinese characters, refer to here. These dozens of rules are mainly used to eliminate or reduce unnecessary network latency and compress the data to be transmitted to a minimum.
1) Merge and compress CSS, JavaScript, images, and static resource CDN Cache
By using the build tool Gulp, you can combine and com
Learning javascript object-oriented understanding of javascript prototype and prototype chain, javascript object-oriented
Let's take a look at a picture and sort it out.
I. Basic Concepts Prototype chain]Each constructor has an object. The prototype object contains a pointer to the constructor, And the instance contains an internal pointer to the prototype objec
Javascript basics and javascript beginners are recommended in javascript beginners.
Some time ago, when I read the javascript advanced tutorial, I found many basic javascript concepts that I don't understand.
I searched the internet and saw that 《Basic
Javascript is a sequence of statements executed by the browser.
Javascript statements
The javascript statement is a command sent to the browser. These commands are used to tell the browser what to do.
This JavaScript statement tells the browser to output "Hello World" to the webpage ":
Document. Write ("Hello W
With the development of front-end technology, front-end services become increasingly heavy, which greatly increases the amount of JS Code. Therefore, to improve the Web performance, we need to focus not only on the page loading time, but also on the page operation response speed. Next we will discuss several ways to improve JavaScript efficiency. I. Network Optimization
YSlow has 23 rules. For Chinese characters, refer to here. These dozens of rules
JS framework Learning
1. Underscore http://documentcloud.github.com/underscore/========================================================== ======================================Underscore is a utility-belt library for JavaScript that provides a lot ofFunctional programming support that you wowould have CT in prototype. js (or Ruby ),But without extending any of the built-in Javascript objects. It's the tieGo
Comparison of the Javascript efficiency of various Javascript browsers it is reported from an article on "translated words" that the comparison of Javascript in various browsers. As a Javascript developer, I personally pay more attention to this matter. I still trust SunSpider in the test area, as the original article
triggered.//// The Word "debounce" does not know how to translate it. I am a non-specialist and dare not translate it easily, so that I can not smile generously. :)//Var debounce = function (func, threshold, execAsap ){Var timeout;Return function debounced (){Var obj = this, args = arguments;Function delayed (){If (! ExecAsap)Func. apply (obj, args );Timeout = null;};If (timeout)ClearTimeout (timeout );Els
Learning javascript object-oriented understanding javascript objects and javascript object-oriented
I. Programming ideasProcess-oriented: process-oriented, step-by-step Refinement from top to bottom. The program is regarded as a set of function calls.Object-oriented: Objects Act as the basic unit of a program and are decomposed into data and related operations.Ii
Understanding and using JavaScript callback functions | JavaScript is very sexy and javascript callback Functions
In JavaScript, a function is the first class Object. This means that the function is of the Object type and can be used in the first class like other objects (such as String, Array, and Number, because they
Basic JavaScript instance
Generate text
Generate common text and tags
Head Section
Body section
External Javascript
ExampleJavascript statements, comments, and code blocks
Javascript statements
JavaScript code block
After reading the BestPractices chapter of JavaScriptDOM programming art, we know that we have many things to consider when creating a webpage. For example, we use JavaScript to enhance our webpage, but we need to consider that, if your browser does not support JavaScript, or the user disable JavaScript, can our webpage be displayed normally? For example,
The
Javascript: a deep understanding of basic Javascript knowledge and a deep understanding of javascriptThe eval global function is shown in the loader of dojo as the next function.
Var eval _ = new Function ('Return eval (arguments [0]); '); // The Function runs in the top-level scope, but the running efficiency is slower, however, this method does not pollute global variables and calls the top-level scope ev
Why is the current mainstreamProgramAre all objects created in the language? The following definition gives us an answer:
In object-oriented languages, objects are defined as anything that people want to study. From the simplest integer to the complex aircraft, objects can be viewed as objects, it not only represents specific things, but also abstract rules, plans, or events.Aside from these abstract definitions, we can understand them from the underlying computer technology,Objects are actual
[JavaScript] implements multiple JavaScript special effects and javascript special effects on the same webpage.
If the label appears twice on the webpage, all the JavaScipt scripts will no longer take effect, the label can only appear once. However, multiple JavaScript effects are often required for the same webpage.
Javascript: Your high-level functionIn common programming languages, function parameters can only be basic types or object references, and return values are only basic data types or object references. However, in Javascript, a function can be passed as a parameter or returned as a return value. A high-order function can take a function as a parameter or a function as a return value. These two situations hav
event requests based on the time period. Consider the following throttle function:
Function Throttle (FN, interval) {
var doing = false;
return function () {
if (doing) {return
;
}
doing = true;
Fn.apply (this, arguments);
settimeout (function () {
doing = false;
}, Interval);
}
Window.onresize = throttle (function () {
console.log (' execute ');
}, 500);
By controlling function execution time, you can achieve a perfect balance
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.