ajax===http://blog.csdn.net/seuge/article/details/8209685
"Asynchronous JavaScript and XML" (Asynchronous JavaScript and XML)
When we operate the page, we often just need to refresh a portion of the data on the page or even a text box data, but the traditional way of refreshing the server will send the entire page back to the browser, the browser load the entire page, so not only wasted bandwidth, and the entire page refresh is not smooth.
Ajax technology solves this problem, the idea of Ajax is that I need to refresh the local data when a request to the server, the server receives the request data will need to refresh the data loopback, the browser after receiving the data through the script to update the corresponding location of data, the process must be in the background. The core of this process is the JavaScript object XMLHttpRequest. The object is a technique that supports asynchronous requests. In short, XMLHttpRequest allows you to use JavaScript to make requests to the server and handle the response without blocking the user.
implementation in Goahead:
1. First is a front page:
[HTML] View plain copy
2. Implement the XMLHttpRequest request response on the server side.
Create a handle//and ASP or form for the AJAX request, adding an AJAX handler function to the. c file.
[HTML] view plain copy int websajaxhandler (webs_t wp, char_t *urlprefix, char_t *webdir, int arg, char_t *url, char_t *path, char_t *query) {websheader (WP); Webswrite (WP, T ("<body>
[HTML] view plain copy websurlhandlerdefine (T ("/ajax"), null, 0, WEBSAJAXHANDLER,&NBSP;0); This enables a partial refresh.
extension [HTML] view plain copy xmlhttp.open ("GET", "/ajax/", True); Xmlhttp.send ();
This is a background data request, now only a schematic, so there is no classification of AJAX requests, can be subdivided later such as
Xmlhttp.open ("GET", "/ajax/time", true); The
then responds with two judgements on the Goahead side, responding to the response.
#################################################
Above is a particularly good framework for
more detailed explanations see: http://www.w3school.com.cn/ Ajax/index.asp