Home > Web Front-end > JS Tutorial > body text

Common examples of Jquery work Using AJAX to update web pages asynchronously_jquery

WBOY
Release: 2016-05-16 18:04:36
Original
960 people have browsed it

AJAX = Asynchronous JavaScript and XML., is a technology for creating fast dynamic web pages.
AJAX allows web pages to be updated asynchronously by exchanging a small amount of data with the server in the background. This means it is possible to update a portion of a web page without reloading the entire page.
With jQuery AJAX, you can directly load remote data into selected HTML elements on the web page.
There are three commonly used functions in Jquery Ajax, namely:
$.post(url,data,callback,type): Use HTTP POST to load remote data;
$.get(url,data,callback , type): Use HTTP GET to load remote data;
$.ajax(options): Load remote data into the XMLHttpRequest object;
If you need an in-depth understanding of the above three ajax functions, you can refer to me The blog post "Detailed explanation and practical application of jQuery AJAX function".
Example:
ajax_load.html file content:

Copy code The code is as follows:





ajax_load.html


I am Li Yun, Jquery is very useful!





index.html file content:
Copy code The code is as follows:



< head>

Use Ajax post, get or Ajax methods to change HTML content




Change the content here through Ajax load






As above, the above three methods can achieve the same effect, this example comparison It's simple, and it will be helpful to those who are just starting to learn Jquery ajax functions. More importantly, you need to try it yourself.
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!