What is Prototype.js?
In case you didn't use the famous prototype.js, let me tell you, prototype.js is a JavaScript class library written by Sam Stephenson. This concept wonderful, and compatible standard class libraries can help you easily build a rich client page with high interactive Web 2.0 features.
If you have tried using it recently, you probably understand the document is not a strong one of the author. As many developers I used to use this class library, I have to get into the source code of Prototype.js and experimentally. I think, after I study it, share what I learned to everyone is a good thing.
At the same time, in this article, I will also provide an Objects, Classes, Functions, Extensions for this class library to Dong East's unofficial reference.
When reading this document, developers who are familiar with Ruby will notice that there is very similar to some of Ruby's internal category and this class library extension implementation.
related articles
Advanced JavaScript Guide.
Some practical functions
This class library has many predefined objects and practical functions, which obviously liberate you from some repetitive typing.
Use $ () method
$ () Method is to use a convenient discument.getlementById () method in the DOM, just like this DOM method, this method returns the element of the ID incoming ID.
This is more winning more than a method in the DOM. You can pass multiple IDs as a parameter and then returns an Array object with an element with all required elements.