Home >Web Front-end >Front-end Q&A >What are ajax and jquery

What are ajax and jquery

藏色散人
藏色散人Original
2021-11-11 11:11:134141browse

ajax is a technology used to create better, faster and more interactive web applications, while jQuery is a fast, concise JavaScript framework and another excellent JavaScript code after Prototype Library.

What are ajax and jquery

The operating environment of this article: windows7 system, jquery1.2.6 version, DELL G3 computer

#What are ajax and jquery?

Introduction to ajax:

Ajax is Asynchronous Javascript And XML (Asynchronous JavaScript and XML), a new term proposed by Jesse James Garrett in 2005. Describes a 'new' approach using a collection of existing technologies, including: HTML or XHTML, CSS, JavaScript, DOM, XML, XSLT, and most importantly XMLHttpRequest. Web applications using Ajax technology can quickly present incremental updates to the user interface without the need to reload (refresh) the entire page, which allows the program to respond to user operations faster.

Source:

The term Ajax comes from describing the transition from Web-based applications to data-based applications.

Ajax is not a new programming language, but a technology for creating better, faster, and more interactive Web applications.

Use JavaScript to make requests to the server and process responses without blocking the user's core object XMLHttpRequest. Through this object, your JavaScript can exchange data with the web server without reloading the page, that is, it can produce a partial refresh effect without refreshing the page.

Ajax uses asynchronous data transfer (HTTP requests) between the browser and the web server, which allows a web page to request a small amount of information from the server instead of the entire page.

How AJAX works

Ajax can make Internet applications smaller, faster, and more user-friendly.

Ajax is a browser technology that is independent of Web server software. Ajax is based on the following web standards:

JavaScript, XML, HTML and CSS The web standards used in Ajax are well defined and supported by all major browsers. Ajax applications are browser and platform independent.

Web applications have many advantages over desktop applications; they can reach a wider range of users, they are easier to install and maintain, and they are easier to develop.

However, Internet applications are not as complete and user-friendly as traditional desktop applications. With Ajax, Internet applications can become more complete and user-friendly.

jquery introduction:

jQuery is a fast and concise JavaScript framework. It is another excellent JavaScript code library (framework) after Prototype. It was launched in 2006 Published by John Resig in January. The purpose of jQuery's design is "write less, do more", which means writing less code and doing more things. It encapsulates common JavaScript function codes, provides a simple JavaScript design pattern, and optimizes HTML document operations, event processing, animation design and Ajax interaction.

The core features of jQuery can be summarized as follows: It has a unique chain syntax and a short and clear multi-functional interface; it has an efficient and flexible CSS selector, and can expand the CSS selector; it has convenient plug-in extensions Mechanism and rich plug-ins. jQuery is compatible with various mainstream browsers, such as IE 6.0, FF 1.5, Safari 2.0, Opera 9.0, etc.

Language features:

Quickly obtain document elements

jQuery’s selection mechanism is built on the Css selector, which provides the ability to quickly query elements in DOM documents , and greatly enhances the way to obtain page elements in JavaScript.

Provide beautiful page dynamic effects

jQuery has a series of built-in animation effects, which can develop very beautiful web pages. Many websites use jQuery’s built-in effects, such as fade in and fade out, Dynamic special effects such as element removal.

Create AJAX non-refresh web pages

AJAX is the abbreviation of asynchronous JavaScript and XML, which can develop very sensitive non-refresh web pages, especially when developing server-side web pages, such as PHP websites, it is necessary Communicate back and forth with the server. If AJAX is not used, the web page has to be refreshed every time the data is updated. However, after using AJAX special effects, the page can be partially refreshed to provide dynamic effects.

Provides enhancements to the JavaScript language

jQuery provides enhancements to basic JavaScript structures, such as element iteration and array processing.

Enhanced event handling

jQuery provides various page events, which can avoid programmers from adding too much event handling code in HTML. Most importantly, its event handler eliminates Fixed various browser compatibility issues.

Change the content of the web page

jQuery can modify the content of the web page, such as changing the text of the web page, inserting or flipping the web page image. jQuery simplifies the way that JavaScript code needs to be processed.

Related recommendations: "Ajax video tutorial" "jquery video tutorial"

The above is the detailed content of What are ajax and jquery. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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
Previous article:What is jquery.form.jsNext article:What is jquery.form.js