A lot of data have said that the parameters of the Get method are limited, the length of the parameters of the Post method is unlimited, which is also the advantage of the post compared to got.
Using the Post method in Ajax, the normal parameter
1, before the AJAX send the request plus Anyajaxobj.setrequestheader ("If-modified-since", "0″)."
2, in the AJAX send the request before adding Anyajaxobj.setrequestheader ("Cache-control", "No-cache").
3, after the URL plus a random number:
Today encountered a problem, the AJAX request in the transmission of Chinese, encountered garbled problems.
The following code:
function Updatefolderinfobycustid (FolderID, FolderName, CustID) {
$.ajax ({
type: "Post",
contentType: "
Ajax will encounter a problem in the process of using, when a user executes multiple asynchronous requests within a short period of time, if the previous request is not completed, it will be canceled to execute the latest request, most of which will
Previously written is from the JavaScript array to obtain provincial and municipal information to achieve two-level linkage, but there seems to be a lot of demand is to get information from the database, so it needs to be based on asynchronous
Phenomenon: Use Ajax to send a request, because backstage PHP, using Ali's text message, later return type object, see in the browser is such a return format: {msg:90,ok:ok}[1, #98978]. Ajax return value is difficult to handle. {Msg:90,ok:ok} This
Add a user, need to determine whether the phone number exists, the first idea is very simple in the TextBox set up a onmouseout event, in IE has a good embodiment, but in Google is not very good
OK, in a different way, when submitting the form to
When the AJAX server side responds to data with PrintWriter Out=resp.getwriter (), Out.print (0), Out.print (1) indicate success or failure, Without out.write There is a reason, first look at print and write the similarities and differences between
Needless to say, the key code looks like this:
Jquery.ajax ({
"type": "Post",
"url": "Http://www.baidu.com",
"Success": function (rel) {
if ( rel.issuccess) {
window.open (rel.url, "_blank");
}
this URL request after successful
In the process of AJAX background data request, we sometimes want users to know that the background is still doing some things, this time we need to give the user a very clear hint, which is what we call the progress bar
Implementation principle:
1. Written in front:
Read Request:
With certain HTML, CSS, JavaScript, JSON basics
2. What is Ajax
Ajax: "Asynchronous JavaScript and XML" (Asynchronous JavaScript and XML) refers to a web development technology that creates interactive Web
Problems with Get encountered:
1. Question one. Caching: When each access URL is the same, the client directly reads the contents of the local cache, even if the background data changes the foreground will not change;
Solution: In? The following
First, the main reason to use Ajax
1, through the appropriate AJAX application to achieve a better user experience;
2, some of the previous server burden to the client, to facilitate the client idle processing capacity to deal with, reduce the
The previous mention of duplicate submit form issues, processing token password checksum, redirection, there is a frequently used method is the new page processing form submission, close the current page when finished, and refresh the page before
This example describes the basic common code for AJAX. Share to everyone for your reference, specific as follows:
More interested readers of AJAX-related content can view this site: "Summary of Ajax usage in jquery", "Summary of
The HTML5 AJAX 2.0 standard enhances many features of Ajax, including sending Formdata data, uploading data progress bars, and more. In practice, however, Ajax can send binary data in bytes.
Send binary data
var oreq = new XMLHttpRequest ();
The example of this article introduced the AJAX authentication username and password of the specific code for your reference, the specific contents are as follows
1.ajax Body part
var xmlrequest; function Createxmlhttprequest () {if (window).
This example for you to share the Ajax no refresh pagination of the specific code for your reference, the specific contents are as follows
HTML page
Previous page Next Last page Go
webservice1.asmx
Using
For beginners, learning Ajax to verify the user's unique combat is to consolidate Ajax,jquery,json and Struts2 basic knowledge, specific content as follows
Browse Effects Chart:
So we'll start with the following steps :
1. First, we first
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.