A Web site using AJAX technology, not only can improve the user experience of the site, but also greatly save valuable bandwidth, reduce the server load (no longer need to interact with the entire Web page content, but local).
Today, share an
From just contact B/s development, have heard of Ajax technology, but has been in ambiguous state, the truth understand, one to the hands of the dumbfounded.
Ajax seems to be unfathomable technology, become a B/s learning process in a shadow.
The Readystae status is described in the pragmatic Ajax A Web 2.0 Primer, selected passage as follows:
0: (uninitialized) the Send () method has not yet been invoked.
1: (Loading) the Send () method has been invoked and request in progress.
2:
Project code structure See what I wrote earlier [Ext/fckeditor integration--AJAX UI--a new way of thinking about web development, changing ideas in time].
In the
├─taskofpig
│├─controller
│├─dao
│├─js
│├─music
│├─tpl
│├─tpl_c
│└─_log
The project
The status of the XMLHttpRequest object represents the state of the current HTTP request, is a long integer data, and now describes what it means.
HTTP request status and its meaning table
1XX-Information Tips
100-The initial request has been
Basic usage:
Copy Code code as follows:
var ajax = new Ajaxobj (URL);
Ajax.addlistener function (r) {
Alert (R);
});
Ajax.send ();
You can also call continuously:
Copy Code code as follows:
var ajax
Ajax technology is the crystallization of a variety of computer technology, its name comes from: asynchronism (asynchronous), JavaScript, and, XML, the first letter of 4 words, that is, asynchronous JavaScript request processing XML technology. The
JSON and JSONP
Jsonp and JSON like, what's the connection between them?
JSON (JavaScript Object notation) is a lightweight data interchange format. For the JSON everyone should be very familiar with it, not very clear friends can go to the
In Django, using jquery Ajax post data, there is a 403 error
Method One:
If you use jquery to handle Ajax, Django sends a problem-solving code directly. Put it in a separate JS file, in the HTML page can be introduced. Note that this JS file must
This article analyzes the difference between using GET and post mode for Ajax. Share to everyone for your reference. The specific analysis is as follows:
If the request is a get mode, the pass parameter is sent to the server side via the URL
The example of this article explains the jquery $.ajax () method parameters for your reference, the specific contents are as follows
$.ajax ({
URL: ' test.do ',
data:{id:123,name: ' Xiaoming '},
type: ' Post ',
dataType: ' JSON '
When using jquery to implement Ajax in ASP.net, aspx,ashx can be used on the server side, as well as webservice. Recently studied the WebService mode, the jquery Ajax method calls the jquery Ajax method call asp.net WebService Detailed instance code
Today in the test project found that an action performed 2 times, this operation takes approximately 5 minutes to complete, engineering environment apache2+tomcat6.0.
The online search found several places to set timeouts:
1.ajax syntax to set the
1. Design of Shopping cart class
Shoppingcartitem: The package of books, including title, quantity, price three attributes, and corresponding getter and setter methods.
ShoppingCart: Shopping Cart package, items for map, and add shopping cart, get
When the web is displayed, we often encounter paging display, but the online paging method is too much bandwidth, so I thought of using Ajax to paging, using the returned JSON to process the returned data, greatly simplifying the bandwidth pressure.
Ajax passes parameters to Xmlhttpreq.onreadystatechange
Pass:
xmlhttp.onreadystatechange= function () {XX (123)};
Or xmlhttp.onreadystatechange= the new Function ("XX (123)"); It's OK.
Copy Code code as follows:
Ajax passes
The basic ============================================
1, the most classic is the cache problem under IE.
If you are using GET, then there is a caching problem under IE. Causes the code to execute only once. The solution is to add a timestamp or
I'll also show you how to use JavaScript scripts and DOM interfaces to create a table for a Web page. Displays the data from the AJAX request to the table.
The server-side page requested in this Ajax instance effect is still: Web_ajax. ASP this Web
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