Recently looking at "JavaScript data structure and algorithms" This book, to fill the data structure and algorithm part of the knowledge, feel that this piece is a short plate.
List : stores an ordered set of elements, but unlike arrays, the
Here we discuss the relationship between the internal prototype (__PROTO__) of the object and the prototype (prototype) of the constructor.
__proto__ of all constructors/functions point to Function.prototype, which is an empty function (Empty
Closure this thing, say difficult also difficult, said not difficult also not difficult, below I to own understanding to say the closure
Explanation of closureFor functional languages, functions can save the internal data state. For a compiled
One, DOM
Dom:dom= Document Object model, which enables the DOM to access and modify the content and structure of a document in a platform-and language-independent manner. In other words, this is a common way to represent and process an HTML or XML
A lot of things are easy to inadvertently forget, so I choose to record down.
Firefox does not support Obj.innertext properties.
The value shown by Obj.innertext alert () is undefined.
Firefox supports InnerHTML properties but does not support
Code as follows, not much nonsense, can be compatible with basically all the mainstream browser (IE,FF), a lot of places can be used:
CopyToClipboard = function (TXT) {
if (window.clipboarddata) {
Window.clipboardData.clearData
It has long been discovered that for an HTML element, the ID can be Chinese, and the getElementById method can be used to correctly access the DOM
Little brother is ignorant, today I know IE actually support JavaScript Chinese programming
To a
One, the external is global, internal is local variable.
Second, add var as local variable (within the method), without VAR as global variable (once used in the method)
Copy Code code as follows:
In the test method above, when
The first part of the basic syntax:
1, data type (string, Decimal, Integer, Boolean, Time date)
Copy Code code as follows:
var s= "3.14" var n=parsefloat (s) s+=5;
var s= "abc3.14" var n=parsefloat (s)//nan s+=5;//parse Convert
JS is a total of 5 original values, 6 typeof can be judged, 9 native built-in constructors.
These 569, constitute the basis of the JS language.
5 Original values are: numbers, characters, Boolean, null,undefined
typeof can judge: number,
Each Javascript function can access a special variable-arguments within its scope. This variable contains a list of all the arguments passed to the function.The arguments object is not an array. Although syntactically it has the same place as an
First, what is the constructor
Constructors are common in some object-oriented languages, such as Java, C + +, and PHP. In JavaScript, a constructor is first a normal function that can be invoked using the new operator and generate a special type
If you're an experienced developer, you might think this is a relatively simple problem, but sometimes we feel it's more interesting.
First, let's look at the definition of the array:"An array is just a list of values which can are accessed by
Operator precedence in JavaScript is a set of rules. This rule controls the order in which operators are executed when evaluating an expression. Operations with higher precedence are performed Fuxian to lower-priority operators. For example,
Object Creation:
When a function object is created, the function object produced by the functions constructor runs code similar to this:
Copy Code code as follows:
This.prototype={constructor:this};
Suppose function f
f
JavaScript when declaring variables, although the use of the VAR keyword declaration and no keyword declaration, many times the operation is not a problem, but the two ways there is a difference. Code that works correctly does not represent the
Queues are an ordered set of advanced First Out (FIFO) principlesThe queue adds a new element to the tail, removing the element from the top
The understanding of the queue
The most common scene in our lives is the queue.The name of the queue is
Static page reads an Access database. htm
Copy Code code as follows:
Add data to a database page-insert.htm
Copy Code code as follows:
friend_namefriend_nickname
Delete Feature-delete.htm
Copy
Usually we will be in some Web site registration page or change the Password page found that when we enter the password, there will be a bar similar to the progress bars to prompt the user to enter the password strength. The following figure:
I
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