Today, I learned about the content of Chapter 4 JavaScript and XML DOM in , and got a preliminary understanding of the basic operations of XML DOM, I also learned about two powerful interfaces for Traversing Dom documents. node iterators
In a good JS Lib, the powerful DOM tree parsing function is indispensable.
Jquery's element selector that conforms to css2 has been independent, called sizzle (http://sizzlejs.com /).
It is convenient to integrate sizzle into our own class
Function
Changeprice2money (s){
If
(
/
[^ 0-9]
/
. Test (s ))
Return
"
Invalid value
"
;
//
S = S. Replace (/^ (\ D *) $/, "$1 .");
//
S = (S + "00"). Replace (/(\ D * \. \ D) \ D */, "$1 ");
//
S =
For JavaScript, most of the time is used for results, but the most basic things are ignored,When you learn the basic JavaScript skills, I think it will be nice to write JavaScript code later.CodeGreat help,Today I will summarize my understanding of
What is typeof?Typeof is an operator,The main purpose is to check whether a variable is of the basic data type.At the same time, it can be determined whether a variable is a string, value, Boolean value, or undefined.
Typeof example Code
I think the clearest way is to try prototype as follows:
VaR animal = function (){This. Name = 'pipi ';This. Age = 10;This. Height = 0;}
VaR cat = function (){This. Play = function (){Alert ("cat play ");}Cat. Prototype = new animal ();}VaR cat1 =
Recently I wrote a few JavaScript statements.ProgramCodeIt involves the effect of dynamically changing images, and the results cannot be displayed under ie. It is really depressing. I finally found the results on the Internet, and it turned out to
Internet Explorer is replaced by IE and mozzila Firefox is replaced by MF.
1. Document. Form. Item Problems(1) existing problems:ExistingCodeThere are many statements such as document. formname. Item ("itemname"), which cannot be run in MF.(2)
Both functions can be used to execute JavaScript after a period of time.Code. Both functions have two parameters. The preceding parameters are execution expressions, followed by the number of seconds.
The difference is that setinterval executes
Generally, when writing a blog or website, we need to make some effects on the illustrations, such as adding shadows, rounded corners, and reflecting images. These effects can generally be implemented in three ways. One is to use PS to modify the
I have nothing to do today. I will explain the replace method in Javascript. It is reasonable to say something wrong or unreasonable, because I am neither an old bird nor a newbie, I also don't know what the birds are ?? Ah ~~
The syntax of the
This time I will learn about the partial application. Let's take a look at the introduction of functions. On the Wiki, we will briefly introduce them:
In mathematics, a function describes the correspondence between each input value and the unique
[1]Variable
1.InEcmascriptNo matter what type of variable, the declaration only usesVaRKeywords
2.Variable names are case sensitive.
3.Only letters and" $And_"
4.Special cases:
VaR num = 10;
VaR num = 5;
In mostProgramming LanguageBoth
Published in: http://www.birchlee.com/post/2011/10/19/27.aspx
Javascript often encounters some key-value pairs, which were previously implemented using two-dimensional arrays. Today, we simply simulate the dictionary help class.
Principle:
Http://space.cnblogs.com/group/javascript/
This article lists 24
Code Suggestions for easier and more efficient writing process. Maybe you are still a beginner in JavaScript and have just finished writing your Hello world. There are many tips that
Translation
Original
One of the most widely used design patterns in Javascript is the module pattern. The module mode is used.A great feature in Javascript-Closure-used to give you privacy in the method some third-party applications that
Scroll up
link 1 link 2 link 3 Link 4
Scroll down
link 1 link 2 link 3 Link 4
Scroll left
link 1 link 2 link 3 Link 4
Scroll to the right
link 1 link 2 link 3 Link 4
JavaScript does not support overloading as C # does, that is, automatic calling of parameters with different names of the same method.
In JavaScript, the same method name will overwrite the first defined method, even if the parameters are
This article will share with you the js problem solutions and experiences accumulated during project development, the title of the article javascript you may not know is just a gimmick or I feel that these experiences may only be a basic thing for
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