[1] definition : Regular, also called a rule or pattern, is a powerful string-matching tool that is an object in JavaScript
[2] features :
[2.1] Greed, matching the longest[2.2] lazy, do not set/g, then only match the 1th
[3] Two types of wording:
Definitions and usageThe replace () method replaces some characters in a string with some other characters, or replaces a substring that matches a regular expression.Grammar stringobject.replace (regexp/substr,replacement)
return valueA new
This article explained the 4 kinds of JavaScript to implement the Simple tab tab switch method, share for everyone to refer to, the specific contents are as followsEffect Chart:
method One: For Loop +if Determines whether the current click
Sometimes, an elegant implementation is a function. Not a method. Not a class. is not a frame. Just functions.
-John Carmack, chief programmer of the Game "Doom"
Functional programming is all about how to break a
I. Overview
In addition to normal operating mode, ECMAscript 5 adds a second mode of operation: "Strict mode" (strict modes). As the name suggests, this pattern allows JavaScript to run under more stringent conditions.
The purpose of establishing
In the actual need may need to specify after the specified time to perform a function to achieve the desired purpose, which is a timer effect, just in the JS has been given such a function settimeout (), the following first introduced the second
God's horse is a closed bag.On the concept of closures, the woman said that the woman is reasonable.
A closure is a function that has access to a variable in another function's scopeThe concept is a bit round and split. Conceptually, closures have
So, why can we delete an object's properties:
var x = {a:1};
Delete x.a; True
x.a;//undefined
But you cannot delete a variable:
var x = 1;
Delete x; false;
X 1
You cannot delete a function:
function X () {};
Delete
This article records people in the learning function to understand some things, deepen the memory and record down, convenient review.
In the recent see "JavaScript function Programming" This book when the pre-sale was set down. The main purpose is
A recent project has a need to use JS to calculate a string of strings written to the memory of the localstorage, as we all know, JS is encoded using Unicode. and the implementation of Unicode has n kinds, which use the most is UTF-8 and UTF-16.
This example describes the code that JavaScript gets the current time of the system. Share to everyone for your reference. Specifically as follows:The screenshot of the running effect is as follows:
The specific code is as follows:
Today for you to recommend three kinds of JavaScript verification email method, I hope to help you learn.First: JavaScript Verify mailbox format
Second: Use JavaScript to verify that email is correctly filled in
test
The return statement is very important in JS, not only has the function of returning function value, but also has some special usage, the following is combined with the example to briefly introduce the function of returns statement.
A. Used to
JavaScript is a weak type of language relative to other languages, in other such as the Java language, the execution of a program requires a compile phase, while in JavaScript there is a similar "precompilation phase" (JavaScript is precompiled in a
In JavaScript, the semicolon at the end of the line has an automatic insertion mechanism that allows some friends to ignore the input semicolon. Of course you'd better get into the habit of typing a semicolon and mastering how JavaScript handles
This example describes the code for JavaScript to write a simple calculator. Share to everyone for your reference. Specifically as follows:The screenshot of the running effect is as follows:
The specific code is as follows
calculator
bidirectional data binding refers to the ability to change the corresponding UI at the same time as the object's properties change, and vice versa. In other words, if we have a user object, this object has a Name property, and whenever you set a new
1, functions that can be passed in a string object are described in
The/* Match () method retrieves the specified value within a string, or finds a match for one or more regular expressions.
The method is similar to IndexOf () and
What is a closure function? At the beginning of the closure of the study, it is very difficult to understand. As far as his official explanation is concerned, it is more conceptual.
But we still start with the meaning of closures .A closure is a
About JavaScript front-end development of the implementation of binary read-write operation of the relevant introduction, please look at the following details, this article introduces a very detailed, with reference value.
For a variety of reasons,
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.