First of all, what's the regular expression? In fact, the introduction of concepts often does not help us understand what it is, so I would like to briefly describe the regular expression, in fact, is a string of records string rules, and so we read
Bricks and mortar, and then the wall, in the ECMAScript, the sentence is the walls we need to build. Statements and operators like, for people with a C background, it is natural, the following similar form to organize the relevant knowledge of the
1. Prototype chain
Rarely used alone
Copy Code code as follows:
View Code
Defines the superclass class, which has an attribute property and a method Getsupervalue
Function Superclass () {
This.property = true;
}
Usually only after work time can code, free to write a pure JavaScript version. The Calendar.js file is referenced, and then the ID of the input to be set to the Calendar control is set to calendar, and the input is changed to a calendaring control.
This article examples for you to share a JS form verification of the specific code for your reference, the specific content as follows
Online demo:http://www.hui12.com/nbin/csdn/jsinput/demo.html
Effect Chart:
/* Authentication type
First, the constructor
Number (value)
New Number (value)
Second, number attribute
1. Number.MAX_VALUE returns the maximum number that can be represented.
2, Number.min_value can represent the smallest number.
3, Number.NaN non-numeric value.
4
A function is a statement that can be run at any time, simply put, a function is a set of statements that completes a function, and it accepts 0 or more parameters.
the basic syntax for a function is as follows
Copy Code code as follows:
A. String
Copy Code code as follows:
var language = "JavaScript";
var language = ' JavaScript ';
Strings can be used in double quotes and single quotes, depending on your personal preference.
The string has a length
Object Properties
Copy Code code as follows:
Document.title//Set document title equivalent to HTML label
Document.bgcolor//Set page background color
Document.fgcolor//Set foreground colors (text color)
JavaScript has a number of tips to make programming easier. One of these is the eval () function, which can execute a string as a JavaScript expression. Here is a description of it
Eval function
Function: First explain the JavaScript code, and then
The specific code and comparison are as follows:
Copy Code code as follows:
JavaScript version of the common sort algorithm
Random number of Maximum random number Regenerate
Time consuming
We first look at the previous uniform Motion Code, modified the speed speed will appear after what kind of a bug. Two benchmarks are added to the test.
Copy Code code as follows:
"
In fact, such a code if the
__PROTO__ is an internal prototype, prototype is a constructor prototype (constructor is actually a function)
The stereotype of a constructor (prototype) is an object
So what is a builder?To create an object, you first have an object constructor,
Although arrays are objects in Javascript, it is not recommended to use a for in loop to traverse an array, in fact, there are many reasons to prevent us from using the for in loop for arrays.Because the for in loop will enumerate all the attributes
First, I want to talk about the loading and execution of JavaScript. Generally speaking, the browser for JavaScript to run two major features: 1 load immediately after the execution, 2 will block the subsequent content of the page (including page
In some programming languages like C, each piece of code within the curly braces has its own scope, and the variables are invisible beyond the declaration of their code snippet, which we call block-level scopes, and no block-level scopes in
In our daily development, manipulating and transforming arrays is a very common operation, and let's take a look at an example:
Copy Code code as follows:
var descolors = [],
Srccolors = [
{r:255, g:255, b:255},//White
{r:128, g:128,
How do we iterate through the elements in the array? 20 years ago when JavaScript was first born, you could implement array traversal like this:1 var arr=["One", "one", "three"; 2 for (var i=0;i) {3 document.write (Arr[i]); 4 } Since ES5 is
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