Modification at night
Code, Previously used
Copy codeThe Code is as follows: $. Ajax ({
..
Datatype: 'json ',
...
Success: function (JSON ){
// Disable success
},
Error: function (error ){
// Always execute this error
}
});
Why? After
I recently encountered the problem of passing Chinese parameters. Search online, copy, paste, and publish the "ultimate" solution "is nothing more than escape (STR) for transcoding, and then write a method on the server to edit it again, or use
1. Chrome style jquery image gallery
A jquery plug-in for implementing beautiful chrome image galleries for Online demonstration
2. Awkward Showcase
This plug-in can be used to display slides of various content, such as text, images, videos,
Jquery1.3.2 and jquery1.4 + do not exist.
Through comparison, we finally find a difference between the two versions.
Jquery1.4 + added a section in the Ajax Method
CodeUsed to call the onreadystatechange method in abort.
Copy codeThe Code is as
Preface:
I think the title is still quite long. There are many other functions. In fact, the simplification is just a function. asynchronous form submission only supports Image Upload under the big function of asynchronous form submission, simulate
There are more and more Ajax applications. Most of the Ajax processing is to display a "loading..." on the front-end, and then submit the data to the server for processing. After the processing is completed, the "processing completed" is displayed ".
Let's take a look at a simple piece of JavaScript code returned by jquery Ajax.
Code
Copy code The Code is as follows: function getreturnajax {
$. Ajax ({
Type: "Post ",
Http://www.jb51.net/userexist.aspx ",
Data: "username =" + vusername.
The error method is directly executed to indicate an error. ajax jsonp has never been used before. Its understanding is similar to that of common ajax requests, but it is not well understood. This error occurs, after debugging (checking the backend
Function Description: The main function is to display data by page. You can configure the page number to be displayed on each page in the configuration file. You can perform multi-condition joint query. Here is just a simple query. You are welcome
As follows:
1: Non-Ajax
Front-end:
Corresponding background:
2: Ajax of JQuery
Before using JQuery to submit a form, we need to first reference jquery. form. js, which is from http://www.malsup.com/jquery/form/. in this case, the js files to be
AJAX = Asynchronous JavaScript and XML.
AJAX allows asynchronous updates on webpages by exchanging a small amount of data with the server in the background. This means that it is possible to update part of the webpage without reloading the whole
The differences between ajax synchronization and Asynchronization are as follows:
Code 1:
Copy codeThe Code is as follows: Synchronize = function (url, param ){
Function createXhrObject (){
Var http;
Var activeX = ["MSXML2.XMLHTTP. 3.0",
Tip: We should always pay attention to browser cache. When using the GET method, we should add the timestamp parameter (net Date ()). getTime () to ensure that the URLs sent each time are different, so that browser cache is avoided.
Tip: when a
The client is the UTF-8 code, which is now recognized as the standard code
In this case, when AJAX is used to asynchronously obtain the server information of GB2312 encoding, Chinese Character garbled characters are inevitable.
Because the target
Example:
Rsajax. js:
Copy codeThe Code is as follows: var http_request = false;
Function makePOSTRequest (url, parameters ){
Http_request = false;
If (window. XMLHttpRequest ){
Http_request = new XMLHttpRequest ();
If (http_request.overrideMimeType )
Because jquery is used, the. abort () method is not found in the manual. I searched the internet and found it at http://ooxx.me/jquery-ajax-abort.orz. the usage of. abort () in jquery is directly used as an example:
Copy codeThe Code is as follows:
Request methods, including GET and POST:
GET
The most common HTTP request is GET. The GET request directly follows the URL and starts with a question mark. (Window. location. search is used in JS ). The parameters can be encoded using
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