Let's take a look at the introduction of the Nodejs official web site:
Its characteristics are:
1, it is a JavaScript running environment
2, relies on the chrome V8 engine for code interpretation
3, event-driven
4, non-blocking I/O
5,
The subconscious also does not use object-oriented thinking to write JavaScript code, and rarely to in-depth understanding of prototype, closures and other concepts. This causes the writing code to be very often bad.
Perhaps the most important
The
parseint function of JavaScript
The parseint function of JavaScript, we all know what it is.
But you know
How much does parseint ("07") return?
How much is parseint ("08") returned?
The correct answer is
parseint ("07") returns 8
parseint ("08")
Chapter Three DOM
The DOM is the initials of the Document Object model.
Node
ELEMENT node: Is the atom of the DOM. For example: text paragraph element name p unordered list element name ul ... "NodeType property value is 1"
Text node: A text
The 1th chapter is a brief history of JavaScript. Nothing to remember, the simple introduction of the origin of JS, browser conflicts and so on.
2nd Chapter JavaScript Grammar. It is noteworthy that:
(1) The string is enclosed in single or
anchors[]; links[]; Link Connection object Usage: document.anchors [ [x] ] document.links [ [x] ] ; ; Document.anchors is an array that contains all the anchor tags in the document (the tag that contains the Name property), and a subscript
To represent the address of a window, use the .location. Previously wrote a piece with window.location.href implementation to refresh another frame page, hereby I looked at the detailed usage of Locaiton, which is somewhat improved, as follows:
Note:
Originally I thought JS boolean conversion and Java, after all, we are the same ancestors, the following is my writing.
function foo () {
var temp = boolean.valueof (' ');
Alert (temp = = false);
}
Java variable Javaboolean is a string, its value
JavaScript objects are instantiated and can only be used to create new subclasses that inherit from these objects.
The Window object is parent for all objects
The main properties of the Window object are: Name,length,parent,self,top,status,default
To client-side validation of the date format that was filled out in the form, a piece of code was found on the internet, which used parseint to make judgments about the day, and there were statements like this:
......
else if (parseint (month) 12)
Sample code:
Result >>>= expression
Where the argument is any variable of result.
expression is any expression.
Instructions for an unsigned right shift assignment operation in JavaScript
Using the >>>= operator is equivalent to using the
Learning JS, sure to learn the scope, JS scope and other mainstream language scope there is a big difference.
A. js does not have a block-level scope.
JS does not have block-level scopes, just like this:
if () {
var a =
Console.log
Way 1,splice
var ary = [1,2,3,4];
Ary.splice (0,ary.length);
Console.log (ary); The output [], an empty array, is emptied
Method 2,length assignment to 0
This is interesting, and other languages such as Java, whose array length is read-
In Web browser software, Internet Explorer (IE) is now a standard software. As you can see, almost every machine running a different version of the Windows operating system (and many other operating systems) uses IE. Microsoft has been using ActiveX
Program design will often encounter a situation, that is, you can not know beforehand what data users will need, must be based on user selection and then from the server to retrieve data after the user feedback. For example, in a simple situation,
From:JavaEye.com
Prototype provides a JavaScript object-oriented infrastructure that we can use for object-oriented programming, defining object types in the following ways:
var person = class.create ();
Person.prototype = {
I've been using a gadget and found it useful in building JavaScript applications. It is a very simple template function that is fast, supports caching, and is easy to use. I would like to share some of the techniques used in the process of using it.
This method returns a random number between 0 (including) and 1 (excluding)Grammar
Math.random ();
The following are the details of the parameters:
NA
return value:
Returns the number of random numbers between 0
This method returns the Ex, where x is the parameter, and E is the Euler invariant, the base of the natural logarithm.Grammar
Math.exp (x);
The following are the details of the parameters:
X: a number.
return value:
If session ("login") <> "888888" then ' to determine whether the session is valid
Response.Write ("Session Expired")
End If
%>
Untitled Document
Http://www.jb51.net
Can you pop a warning when it's time to click and then go to another
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.