1. Introduction to jQuery
Just like the Ajax framework mentioned in the previous section, to put it simply, jQuery is an excellent javascript framework that allows users to conveniently handle html, events (bubble) events, animation effects, ajax interaction, etc. It has greatly changed developers' habits of using JavaScript. Since jQuery was first created in 2006, it has attracted many JavaScript experts to join its team. As events go by and new versions of jQuery are released one by one, it is attracting more and more attention.
Today, jQuery has developed into a powerful framework integrating various javascript/css/dom and ajax functions. You can simply use code to achieve various web page effects
Currently jQuery mainly provides the following functions:
1. Access part of the page frame. This is one of the main functions of the DOM model. DOM has a fixed method for obtaining a certain node or a certain type of node on the page, and jQuery greatly simplifies its operation steps.
2. Modify the performance of the page. The main function of css is to modify the performance of the page through styles. jquery also solves the problem of the support level of many browsers for css3, so that each browser can use the css3 standard well, which greatly enriches the css use.
3. Modify the content of the page. Through the powerful API, jquery can easily modify the page content, including text content, insert new pictures, form options, and even the entire page frame.
4. Respond to events. jQuery can handle events conveniently, and developers no longer need to hate browser compatibility issues.
5. Add animation to the page. Adding animation using javascript requires a lot of code, but jquery greatly simplifies this process and provides a large number of animation effects with customizable parameters.
6. Interact with the server. jquery provides a complete set of ajax-related operations, which greatly facilitates the development and use of asynchronous interactions.
7. Simplify common javascript operations. jquery provides many additional functions to simplify common javascript operations, such as array operations, iteration operations, etc.
2. Advantages of jquery.
The advantages of jquery are explained in detail by changing the color of every row in the table
Interlaced color change implemented by i.javascript and jquery