JavaScript Learning notes One of the jquery writing pictures equal scaling and preload
In the past for JavaScript is always used in the page to write a few functions, basically do not take into account the encapsulation and reuse of functions, a
The first type: View-source method
View-source is a protocol that is essentially supported by every browser in the early days. But do not know what reason, from IE6 Beta2 after IE no longer support this agreement. This method can only be used in
/* Cookie Library--"Night of the Living Cookie" Version (25-jul-96)
2 Association of Computer Information Technology Co., Ltd., TU geovindu@163.com exchange with each other
3 written By:bill Dortch, Hidaho design
4 The following functions are
Using class libraries makes it easier to resolve compatibility issues. But what is the underlying mechanism? Now let's just roll it out a little bit.
First, the DOM Level2 defines two functions AddEventListener and RemoveEventListener for event
But I also told People later, because there are too many parameters to accept, so if you don't write smart tips very clearly, even I often do not know how to use.
However, the acceptance of many parameters, in addition to the easy to mistake usage,
Original Author: Andy CroxallOriginal link: Ten oddities and secrets about JavaScriptTranslation Editor: Rok Zhang Xinsen XuData types and Definitions1. Null is an objectJavaScript has a null type in many types, it has a unique value of NULL, that
JS operation XML Source, as the dynamic news of the page
Reference JS source code as follows (save as Rss.js file):
Copy Code code as follows:
var main = document.getElementById ("content"). getElementsByTagName ("DIV");
/*
* There is
In the morning to see the "JavaScript Weekly Guide" "Phase III" of the article, which found an article (extending javascript–the right Way), feel good, translated to share with you, this article is not a word for translation, as far as possible to
The basic writing of a For loopThe code is as follows:
Copy Code code as follows:
Example one for (Var i=1;ialert (i);
}
This piece of code is too simple, I am embarrassed to take the shot. The result of the code is to pop 1
Translator Note: This article is about the ECMAScript 6 knowledge points, if you do not even understand the ES5. I must say, you are very behind. CSS4,HTML6, even ES7 ES8 have already begun planning, hurriedly shape move up, otherwise eliminated!
Recently wrote a jquery plugin, in the final completion of the optimization, compared to find compressed file larger, thinking about those can be modified and optimized, and found that the principle of compression has a lot of space to learn,
The rise of Ajax has brought new life to JavaScript, a plethora of JavaScript frameworks (JavaScript framework), some frameworks for summarizing and refining developer project experiences, and some frameworks for commercial companies, At the same
Instanceof and typeof in JavaScript are often used to determine what type of variable is (an instance), but their use is different:
typeof operatorReturns a string that is used to represent the data type of an expression.
typeof expression;
The
JavaScript and dynamic pages cannot get the time the cookie expires, the browser manages the expiration time, and JavaScript and dynamic pages can only set expiration time. cannot be obtained through Document.cookie (JavaScript) or Cookie.expires
The rigorous model introduced in ECMASCRIPT5 allows the developer to have a "better" JavaScript language by allowing JavaScript to run the environment to make and present different processes for the most common and difficult bugs in the development
In JavaScript, you can use the Eval () function to parse the JavaScript code in a string and return the corresponding code execution result:
Copy Code code as follows:
Console.log (eval ("42 * 2"));//84
In essence, eval ()
Simple Mouse Movement Events:
Enter
Copy Code code as follows:
MouseEnter: Not bubbling
MouseOver: Bubbling
The MouseOver event is triggered regardless of whether the mouse pointer crosses the selected element or its child
Get the number of days in a month
I believe that when you read primary school, you will know how many days a year 12 months, there is a special existence-February. The February leap year has 29 days, non leap year February is only 28 days. It is
This article describes the JavaScript implementation of credit card verification method. Share to everyone for your reference. The specific analysis is as follows:
Here the JavaScript version of the credit card verification code, using the Luhn
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