Prototype framework detail_javascript skills

Source: Internet
Author: User
Prototype is a JavaScript framework designed to simplify the development of dynamic Web applications. Prototype is called prototype for a single file distribution. js. This article will introduce you to the prototype framework. if you are interested, learn it together. the Prototype mentioned here is not a prototype in JavaScript programming "), it is a JavaScript class library written by "Sam Stephen Enson. This fantastic idea and compatible with standard class libraries can help programmers easily build rich client pages with highly interactive "web2.0" features.

• Many people first came into contact with Prototype functions starting with their "$" series. these shortcuts are similar to those of desktop applications and are the most frequently used functions in the Prototype framework. In addition, Prototype's support for Ajax is also a matter of great interest to developers. Of course, Prototype is not limited to this function. it expands a lot of JavaScript built-in objects and defines many new objects.

Introduction to the prototype framework:

• Prototype is currently the most widely used Ajax development framework. it features functionality and a small size and is very suitable for small and medium Web applications. A large number of client JavaScript scripts are required to develop Ajax applications, and the Prototype framework can greatly simplify the JavaScript code writing. Even more rare, Prototype is compatible with the excellent features of various browsers. using this framework, you do not have to consider browser compatibility issues.

• Prototype provides many useful extensions for built-in JavaScript objects (such as "String" objects and "Array" objects). In addition, many custom objects are added to the framework, support for Ajax development is implemented in custom objects. Prototype helps developers achieve the following goals:

• (1) various processing of strings
• (2) use enumeration to access collection objects
• (3) perform common DOM operations in a simpler way
• (4) Use the CSS selector to locate page elements
• (5) initiate an HTTP request in Ajax mode and process the response
• (6) listen to DOM Events and process them

• "Prototype" framework function description-use of practical functions

The implementation of the "Prototype" framework only contains one JavaScript file. The size of the "Prototype. js" file in version 1.6 Is KB, about 4220 rows. The syntax applied on the page is similar:

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.