Functions are a group of statements that can be run anytime, anywhere. They are the core of ecmascript. A function includes a set of parameters with the keyword function and function name, andCodeDeclared.
The basic syntax of the function is as
Date: 2012-10-30 Source: gbin1.com
In web and website development, we often need to deal with the date format or number format. Remember the awesome date format class library moment. js we mentioned earlier? Today, we will introduce a class
Date: 2012-10-28 Source: gbin1.com
Remember the Javascript file upload class library we introduced last time-JavaScript Class Library: filedrop? Today, we will introduce another file upload JS Class Library: Fine uploader, independent of any
The operator variable operators defined in the ECMA-262 are divided into Arithmetic Operators, bitwise operators, Relational operators, and Equality operators.
1. unary Operators
The unary operator has only one parameter, that is, the object or
The node type can be determined by checking the node's nodetype. The following three values are often encountered:
1. element (nodetype = 1)
Matches most elements in the XML file. For example, , ,
2. Text (nodetype = 3)
Match all text
Description:
Provides access to file attributes.
Attribute:
Attribute
Description
Attributes
Sets or returns the attributes of a file or folder.
Datecreated
Returns the creation time of
1. Introduction to Javascript
Javascript is a scripting language developed by Netscape ). The emergence of JavaScript enables a real-time, dynamic, and interactive relationship between the webpage and the user, so that the webpage contains more
The following is what I learned from the Javascript kernel book.
1. JavascriptVariable scope: (entire) function bodyValid, with no block scope.
2. JavaScript Functions run in a local scope. The function bodies running in a local scope can access
The following content is excerpted from the Javascript kernel.
In Java or C/C ++, methods (functions) can only be attached to objects and are not independent. In JavaScript, a function is also an object and is not part of any other object.
Determine whether two variables are equalProgramIt is a very important operation in the design. If the original value is operated, it is relatively simple, but it involves objects, it is a bit complicated.
Ecmascript provides two sets of
:
How to achieve the effect shown in the figure:
1. Prompt in the text box
2. When you click Enter, the prompt disappears.
3. When the text box is clicked but no data is input, a prompt is displayed when the focus is
Function each (object, callback) {If (undefined = object. length) {for (VAR name in object) {If (false = callback (object [name], name, object) break ;}} else {for (VAR I = 0, Len = object. length; I
The Javascript Regular Expression literal is enclosed in a slash.
You can set three flag bits in Regexp. They are represented by the letter G, I, and m respectively. These marks are directly added to the end of the Regexp letter:
Code
Frames indicates the array of all Frame Objects in the current window.
Status indicates the status line of the browser.
Defaultstatus indicates the browser status line information.
History indicates the history of the current window, which
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