We all know that the main reason why AJAX can increase the page loading speed is that it reduces the loading of duplicate data through Ajax, that is, it caches the data in the browser memory while loading the data, once the data is loaded, as long
Why is Unicode used?
Unicode encoding is equivalent to using the escape () method in Js. For example, change "John""% U5c0f % u6728". In this way, no Chinese characters will appear in the data parsing process. Then, Unescape is used for
In my opinion, the Ajax trend has gradually receded. Of course, this is just the surface. In fact, there are two major vendors in the Web2.0 era: Google and Yahoo! All secretly brewing their own Ajax products, there is no trend of neglect.
Garett
Make sure there is a jquery file. I use 1.4.2, but I haven't searched for it in a hundred degrees.
Test. aspx
Ajax. js
VaR list = { init: function () { $. ajax ( type: "Post", datatype: "html", /data :{}, // parameter error:
In the past two days, I happened to see someone asking about the Ajax return value. Solve this problem by the way
Let's take a look at the following code:
Ajax test
Content of the 'ajaxshow. php' File
Echo '1, 2, 3, 4 ';?>
I use PHP. If you use
When Ajax post is submitted, it returns normally but reports:
[16:33:22. 879] uncaught exception: [exception... "prompt aborted by user" nsresult: "0x80040111 (ns_error_not_available)" Location: "JS frame: Resource: // components/nsprompter. JS:
We know that the common navigation is generally like homepage . Click the tag to go to the next page. Recently I was learning Ajax, so I thought of doing a refreshing navigation to practice it. The operation is as follows:
Create an index.html
Different project module extension teams adopt different frameworks. prototype is converted to jquery at the front end, and Ajax calls are differentiated based on the following records
Insert title here-->
Of course, when using jquery, you can use
Ajax suggest instance
In the following Ajax example, we will demonstrate how the webpage communicates with the Web server when a user inputs data to a standard HTML form.Enter the name in the text box below:
First name:
Suggestions: Anna,
Note: The following code should be tested in Firefox 3.5, chrome 3.0, and Safari 4. The implementation method of IE8 is different from that of other browsers.
2. Pre-check request
Precheck requests first need to send an http options request
In jquery Ajax, UTF-8 encoding is used by default, so garbled characters are generated when Chinese characters are transmitted.
Solution:
Requester:
Encode the Chinese data to be transmitted in the js method:
Inputval = encodeuri (inputval)
(1) required files:
JSON-simple jar package
: Http://code.google.com/p/json-simple/
(2) List of server-side encapsulated objects
1)
Create a list
List testlist= Newshortlist ();
2)
Put the object in map, and put the map in list
With a blog entitled "agile Ajax," I figure it was time to finally address a topic on Agile development. one of my favorite agile techniques is test driven development (TDD ). it's micro rather than macro, I. e. it's at the level of the individual
Jquery learning notes
After the form is submitted, the page is not refreshed, but partial refresh. Only the ID of the form to be submitted is required.
If you use GET requests, pay attention to Chinese garbled characters, jquery will first use iso885
I. Introduction
The Project Manager assigns a job to implement a function using Ajax. I have never touched Ajax before. I only know that jquery provides Ajax interfaces, but I am still familiar with jquery. So now I want to learn how to use jquery
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.