Home > Web Front-end > JS Tutorial > A detailed introduction to the relationship between jquery and ajax_jquery

A detailed introduction to the relationship between jquery and ajax_jquery

WBOY
Release: 2016-05-16 17:11:29
Original
948 people have browsed it

JQuery and AJAX are both frameworks of Javascript, each with its own different functions. If Javascript is compared to its father, JQuery and AJAX are the biological sons of Javascript. Very complex functions in Javascript are extremely convenient and quick to implement. Let's summarize their respective functions, characteristics and application occasions.

JQuery is a lightweight js library that is compatible with CSS3 and various browsers (IE 6.0, FF1.5, Safari 2.0, Opera 9.0). jQuery enables users to more easily process HTML documents and events, implement animation effects, and easily provide AJAX interaction for websites. jQuery also has many mature plug-ins to choose from. jQuery can keep the code and HTML content of the user's HTML page separated. That is to say, there is no need to insert a bunch of js in the HTML to call the command. You only need to define the id.

The purpose of JQuery is - WRITE LESS, DO MORE, which means "eat less, do more". Let our programmers write less code and do more things.

When is JQuery used? Similar to what was said above, its main uses are:

1. The selector

can quickly and accurately locate the specified element through the $ symbol. Selectors include: basic selector, hierarchical selector, filter selector, form selector

2. DOM operations

find DOM elements through the $ symbol and operate attributes; add and delete Node; operate on styles; set and get HTML text and values; traverse child elements or sibling elements; add events

3. Form validation

4. Animation effects

5 . ajax

The above summary is about JQuery, and the following will continue to summarize AJAX.

AJAX stands for "Asynchronous JavaScript and XML". The so-called asynchronous means that the browser can still do other things after the event is triggered, and controls unrelated to the control where the event occurred are not affected. AJAX is a technology used to create better, faster, and more interactive web applications.

If you only learn to use a few AJAX controls in .net, you may not understand what Javascript and XML in AJAX are all about. These controls are encapsulations of them. Microsoft makes it convenient for us. A lot, but it's a "foolproof" way to use it. If you want to deeply understand the use of Javascript and XML, you also need to master how the client accepts Webservice (.asmx) and WCF (.svc) and how to use general processing program (.ashx) files

So when do you generally use AJAX, and when is it more appropriate to use AJAX? It is generally used where local changes occur on the page. As follows:

1. Form-based interaction

2. Deep tree navigation

3. Real-time user-to-user communication

4. Voting, yes or no Selection, grade evaluation

5. Filtering and complex data operations

6. Prompts/auto-complete during normal input

Not applicable to situations where AJAX is used:

1. Simple form

2. Search

3. Basic navigation

4. Replace large amounts of information

5. Display operations

6. Useless web widgets

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template