I ignore caseG Global MatchM multi-line matching/*Zip matchvar pattern =/^[\w\-]+\. (Zip|gz|rar) $/; [a-za-z0-9_] can be replaced with \wPlus ^ Qualifying first character matchvar str = ' 2-13.rar '; File Name: letter _ number.
In classical object-oriented programming languages, a constructor are a special method used to initialize a newly created O Bject once memory has a been allocated for it. In JavaScript, as almost everything are an object, we ' re most often
this series as effective JavaScript 's reading notes. in the JavaScript , a function object exists on the toString method, which makes it easy to return the source code of a function to a string object. (function (x) {return x + 1;}). ToString ();
Posted in Google Webperf (London Webperf Group),?? August 26, 2014.Efficient JavaScript Web applications must be smooth and fast. Any application that interacts with the user needs to consider how to ensure that memory is used effectively, because
Sandbox mode can compensate for two deficiencies in the namespace pattern:
Using a unique global object as a global variable entry for a program makes it impossible to use two different versions of the API in the same program, so they use
ECMAScript 5 was the first to introduce the concept of "strict mode" (strict). Strict mode allows you to select a more rigorous global or local error condition detection within the function. The advantage of using strict mode is that you can know
1. Comparison of two different methodsArrays are objects in JavaScript, just like most other languages. We can use JavaScript's built-in array constructors to create arrays. Like the literal notation of an object, an array can also be known by
Why do I need to obey the random function of normal distributionIn general, the random number function that we often use math.random () produces a random number that obeys a uniform distribution, can simulate the occurrence of equal probabilities,
According to JavaScript founder Brandon Eich, the best language constructs for JavaScript are:
function is first class citizen (first functions)
Closures (closure)
Prototypes
OBJ = {p1:1, P2: ' ABC '}
Array = [+ +]
I
Posted in Google Webperf (London Webperf Group),?? August 26, 2014.Efficient JavaScript Web applications must be smooth and fast. Any application that interacts with the user needs to consider how to ensure that memory is used effectively, because
Directory:1. Introduction and classification of DOM2. Fetching of DOM elements3. Document structure and traversal3.1 Node Relationship3.2 Element Relationships3.2 Traversal4. Operation of the node4.1 Creating and inserting nodes4.2 Deleting a node4.3
JSON is a lightweight data format that simplifies the effort to represent data structures. In the actual work, we often use it to pass data, but some of the details of its use should be noted. Native JSON objects are defined in ECMAScript5, which
Add the url parameter to the url, and then add the parameter to the url.
Add object parameters to the url. If the original url contains parametersJs Code
function addToUrl(obj){ var aprotocol = location.protocol; var ahost = location.host; var apath
Deep understanding of javascript constructor and prototype object, and javascript Constructor
Common Object creation Modes
Create with the new KeywordThe most basic object creation method is the same as that in most other languages: no object. You
Implementation and technical analysis of verification codes generated by js, and technical analysis of js verification Codes
I will share with you a piece of code for generating and verifying the verification code in js.
JS verification code
The background image of tag a is displayed in ie8. The background image of tag a is ie8.
I encountered a small problem today and had a long struggle.
To add a background image to tag a, add the display: block style to tag.
However, in ie8, the
JQuery fade-in and fade-out elements make their effects more vivid.
To achieve a more vivid effect, you can fade out or fade in an element. In any case, the transparency of the element only changes over time. JQuery provides three functions related
Introduction to JavaScript AMD specifications (1)AMD stands for "Asynchronous Module Definition", which means "Asynchronous Module Definition ". AMD defines that all modules we use are asynchronously loaded, so we need to put the code snippets of
Javascript Regular Expression parameters/g and/I and/gi User Guide, regular expression gi
Regularexpression =/pattern/[switch]
This switch has three values: g: Global match I: case-insensitive gi: Global match + case-insensitive JScript Language
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.