Parent-child relationship between jquery, Ajax, and JavaScript

Source: Internet
Author: User

Jquery and Ajax are both JavaScript frameworks.And has different functions. if Javascript is compared to a father, jquery and Ajax are the sons of JavaScript. It is extremely convenient and convenient to implement complex functions in JavaScript. Next we will summarize their respective functions, features, and application scenarios.


Jquery is a lightweight JS library that is compatible with css3 and various browsers (IE 6.0 +, ff1.5 +, Safari 2.0 +, and opera 9.0 + ). Jquery allows you to easily process HTML documents, events, and animation effects, and provides Ajax interaction for websites. Jquery also has many mature plug-ins to choose from. Jquery can ensure that the user's HTML page is separated from the code and HTML content. That is to say, you don't need to insert a bunch of JavaScript code in the HTML to call the command. You just need to define the ID.


Jquery's purpose is --Write less, do more, That is,"Eat less and do more". This allows our programmers to write less code and do more.


When Will jquery be used? Similar to the above, it is mainly used as follows:

1. Selector

You can use the $ symbol to quickly and accurately locate the specified element. Selectors include: Basic selector, level selector, filter selector, and form selector.

2. Dom operations

Use the $ symbol to locate the DOM element and perform operations on the attribute; add and delete nodes; operate on the style; set to get HTML text and values; traverse sub-elements or peer elements; add events

3. Form Verification

4. animation effect

5. Ajax

 

Jquery is summarized above, and Ajax is further summarized below.


Ajax is "asynchronousjavascript and XML" (Asynchronous JavaScript and XML). The so-called Asynchronization means that after an event is triggered, the browser can still do other things, and controls irrelevant to the control in which the event occurs are not affected. Ajax is a method for creating better, faster, and more interactive data.
Web application technology.


If you only want to use it. net, you may not be able to understand the JavaScript and XML in Ajax. These controls are encapsulation of them. Microsoft makes it much easier for us, however, this is a "silly" method. To deeply understand the use of JavaScript and XML, you also need to know how the client accepts WebService (. asmx) and WCF (. SVC) and general processing programs (. ashx) File Usage


When is Ajax used and when is Ajax more suitable? It is usually used when the page changes. As follows:

1.Form-based interaction

2.Deep tree navigation 

3.Real-time user communication

4.Voting, selection or not, rating 

5.Filtering and complex data operations

6.Prompt/Automatic completion during normal input 

 

Not applicable to Ajax:

1.Simple Form 

2.Search 

3. basic navigation

4.Replace a large amount of information 

5.Display operation 

6.Useless web widgets 

 

The code for jquery and Ajax is a bit involved in the blog "The Relationship Between Dom and JavaScript and jquery" on the front. I will give a few demos to explain it in detail in the blog below, I hope to continue to follow my blog.




 

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.