Home > Web Front-end > JS Tutorial > The differences and connections between jQuery, AJAX and JavaScript

The differences and connections between jQuery, AJAX and JavaScript

高洛峰
Release: 2016-11-28 13:39:11
Original
1246 people have browsed it

JQuery and AJAX are both frameworks of Javascript, each with its own different functions. If Javascript is compared to a 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. In other words, 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.

And 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, operate on attributes; add and delete nodes; operate on styles; set Get HTML text and value; traverse child elements or sibling elements; add events

3. Form validation

4. Animation effects

5. ajax

The above summary is JQuery, and let’s 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 their encapsulation. Microsoft has made it a lot more convenient for us, but This is a "fool-proof" 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

When will that happen? Using AJAX, 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, choice, rating

5. Filtering and complex data manipulation

6 .    普通录入时的提示/自动补齐 

 

不适用使用AJAX的场合:

1.    简单的表单 

2.    搜索 

3.     基本导航

4.    替换大量的信息 

5 . Display operation

6. Uncontinent web pages


🎜🎜🎜🎜
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