The relationship between jquery and Ajax is described in detail _jquery

Source: Internet
Author: User
jquery, Ajax are a framework for JavaScript, each with its own different functions, if the JavaScript compared to the father, jquery and Ajax is the biological son of JavaScript. The very complex features in JavaScript enable them to realize is extremely convenient and quick. Here is a summary of their respective functions and characteristics and application of the occasion.

jquery is a lightweight JS library that is compatible with CSS3 and is compatible with a variety of browsers (IE 6.0+, ff1.5+, Safari 2.0+, Opera 9.0+). jquery makes it easier for users to handle HTML documents, events, animations, and easily provide Ajax interaction for the site. jquery also has a number of mature plug-ins to choose from. jquery enables the user's HTML page to keep the code and HTML content separate, that is, you don't have to insert a bunch of JS into the HTML to invoke the command, just define the ID.

jquery's purpose is--write less,do more, that is, "eat less, dry more". Let our broad programmer be able to write less code and do more things.

And when does jquery use it? Similar to what is said above, its main use is:

1. Selector

The $ symbol allows you to quickly and accurately navigate to the specified element. Selectors include: base selector, hierarchy selector, filter selector, form selector

2. Working with DOM

Find DOM elements by $ symbol, manipulate attributes, add delete nodes, manipulate styles, set get HTML text and values, traverse child elements or sibling elements, add events

3. Form Validation

4. Animation effect

5. Ajax

The above summary is jquery, and continue to summarize Ajax below.

Ajax is "Asynchronousjavascript and XML" (Asynchronous JavaScript and XML). The so-called asynchronous is that the browser can do other things after the event is triggered, and controls that are unrelated to the event's control are unaffected. Ajax is a technology for creating better, faster, and more interactive Web applications.

If you just learn to use some of the AJAX controls in. NET, you may not be able to understand the JavaScript and XML in Ajax in the end, these controls are for their encapsulation, Microsoft makes us a lot of convenience, but this is a "fool" method of use. To understand the use of JavaScript and XML in a profound way, it is also necessary to master how clients accept WebService (. asmx) and WCF (. svc) and generic handler (. ashx) files.

When is the usual time to use Ajax, and when to use Ajax is more appropriate? are generally used in the page where the local changes. As follows:

1. Form-based interaction

2. Deep tree-like navigation

3. Real-time user communication to users

4. Voting, selection, rating

5. Filtration and complex data manipulation

6. The general entry time prompts/automatically to be padded

Applications that use Ajax are not applicable:

1. Simple Form

2. Search

3. Basic navigation

4. Replace a lot of information

5. Display operation

6. Useless Web Widgets
Related Article

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.