ECMA-262 describes a set of keyword-specific uses that can be used to indicate the start or end of a control statement, or to perform a specific operation. Rules: Keywords are reserved for languages and cannot be used for identifiers.
All keywords
The DOM itself has many types, which are described in the previous chapter, such as element types: The elements node, or the text type;
One DOM type
Type name DescriptionNode represents a uniform interface for all types of values, IE is not
String String Object
1. Introduce
String object that operates on strings, such as intercepting a substring, finding a string/character, converting case, and so on.
2. How to define
2.1 New String (value) constructor: Returns a String object that
Introduced
Any programming uses code reuse, otherwise every time you develop a new program or write a new feature, you need to write new words, that's a good break, but the code reuse is also bad, the next two articles we will discuss the code
Introduced
Combined mode (composite) combines objects into a tree structure to represent a "partial-whole" hierarchy, which makes the user consistent in the use of individual objects and composite objects.
The common scene has the control
Inserted only before, after one or more lines, and at the end of program input
That means you can only omit a semicolon in one line, a block of code, and the end of a program.
Which means you can write the following code
Copy Code code as
JavaScript is an object-based and event-driven, security-based scripting language that is widely used, not just web pages, and not trapped by JSP.
Based on the object, that is, you do not need to specify the type of the variable, you give him a 3,
When I first started learning JavaScript, I was always confused by some inexplicable grammatical forms in javascript. And I don't know how many of those inexplicable grammatical forms it supports? Now through this a few months of in-depth
First, things begin with a question
simple
;
a2.name=xxx; A1.name will become
str2=str1;
str2=xxx; STR1 won't change.
Welcome to think nonsense too many students go straight to the end to see "technical flow explanation" ha, then we
1. JavaScript does not provide a way to directly define a two-dimensional array, but you can define a JavaScript two-dimensional array by using an array of defined arrays: for example, defining a 4x3 two-dimensional array A can take the following
One, String object
A string object is used to process text (strings).
Second, the constructor
New String (value)//constructorfunction String (value)//Conversion functions
Third, the property
Length The number of characters in the string
Break and continue statements provide more stringent process control for code execution in a loop. The break statement immediately exits the loop and prevents any code in the loop body from being executed again. The continue statement simply exits
Preface: It is also a primer article. There are several very important language features in JavaScript-objects, prototype inheritance, closures. The closures are a new language feature for programmers who use the traditional static language C/S. In
One, Date object
Format: Date Object name =new date ([date parameter])Date parameters: 1. Omitted (most commonly used)2. English-parameter format: month, year [time: seconds]
such as: Today=new Date ("October 1,2008 12:00:00");
3. Numerical
The replace () method replaces some characters in a string with some other characters, or replaces a substring that matches a regular expression.
Syntax: String.Replace (substr/reg,replacestr/function)
The first argument can be a substring of a
If you've been in touch with JavaScript for a while, you know the array sort function Sort,sort is a method in the array prototype, Array.prototype.sort (), sort (comparefunction), Where comparefunction is a comparison function, let's look at a
In JS to determine whether a value in the array and no function directly use, such as PHP has In_array () this function. But we can write a similar in_array () function to determine whether a value is in a function
Example 1
Copy
In the development of the first few projects encountered onload use of several situations
1. Can be executed inside the body
2. First define the page after the completion of the load use
Copy Code code as follows:
People who use JavaScript often think of their garbage collection mechanism, and JavaScript does not require developers to manually remove garbage as c,c++ does, and when writing JavaScript programs, developers don't care about memory usage. The
Original source: http://www.dnew.cn/post/196.htm
Let's look at some of the following
1.function f (x) {return x*x;}; f (x);
2. (function (x) {return x*x;}) (x);
3. (function (x) {return x*x;} (x));
The first one we should all be very familiar
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.