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, callBack, data, DataType, Asynctype)
{
if (DataType = null) {DataType = "text";}
if (Asynctype = = null) {Asynctype = true;}
$.ajax ({
type:type,//Post or get
Url:url,//url preferably add a url+math.random (), which ensures that each requested page is considered different by the browser
data:data ,//Here is the parameter to pass, the format is data: "{paraname:paravalue}"
Datatype:datatype,//string,xml,script,json,text
Async: Asynctype,//synchronous asynchronous True/false
error:function (XMLHttpRequest, XMLHTTP, info) {
},
success:function ( Result) {
//callback function, result, return value
callBack (Result),
},
});
Call: Myajax (' post ', ' url?id= ' + ID, dook);
Description: Async:true represents asynchrony. This means that when the Ajax sends the request, the foreground will continue to execute the script behind the Ajax block as it waits for the server-side return, until the server side returns the correct result to execute the success, equivalent to two threads; false is synchronous, That is, the foreground waits until the server side returns data before executing.
About Ajax technology to achieve the page without refreshing effect, small set to introduce so many people, I hope to help you!