Ajax No Refresh Loading principle

Source: Internet
Author: User
Tags call back

Ajax (Ajax development)

Ajax, "Asynchronous JavaScript and XML" (Asynchronous JavaScript and XML), refers to a web development technology that creates interactive Web applications.

AJAX = Asynchronous JavaScript and XML (a subset of standard generic markup languages).

AJAX is a technique for creating fast-moving web pages.

AJAX enables asynchronous updating of Web pages by making a small amount of data exchange in the background with the server. This means you can update portions of a Web page without reloading the entire page.

Traditional Web pages (without AJAX) if you need to update the content, you must overload the entire page page.

Now the general website is to use AJAX to achieve the page without refreshing operation.

What is no refresh: Ajax can realize the page and the background of the data interaction, the user completely feel no page has any refresh, this is Ajax no refresh.

Ajax method implementations:

Ajax can be encapsulated to facilitate the invocation of each page:
?

function myajax (type, URL, call Back, data, DataType, Asynctype) {if (DataType = null) {DataType = "text";} if (Asynctype = null) {Asynctype = Tru E } $.ajax ({type:type,//Post or get url:url,//url preferably add a url+math.random () to ensure that each requested page is considered different by the browser data:data,//Here is the parameter to pass, lattice Type is data: "{paraname:paravalue}" Datatype:datatype,//string,xml,script,json,text Async:asynctype,//synchronous asynchronous True/false Error:function
1 2 3 4 5 6 7 8 9 ()
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.