Each time the cache is cleared, a new data will be generated. Therefore, the browser cache is the final problem. After a long struggle, I finally solved the problem. Here I will summarize it.
We all know that AJAX can increase the page loading
Instance:
1. Request Ajax. aspx
Html
Code
Copy code The Code is as follows:
div>
Div>
JS Code copy Code the code is as follows:
2. Page ajaxuserinfomodify. aspxBackground codeCopy codeThe Code is as follows: protected void page_load (
OK. paste a few images first.
The general process is that the user clicks the logon link in the upper-right corner of the page and then the DIV simulation window pops up. This window calls the login. ASPX page through IFRAME, and the user
Previously, Ajax was implemented one by one using JavaScript scripts, Which is cumbersome. After learning jquery, I feel that it is not that difficult to implement Ajax. Of course, in addition to the jquery framework, there are other excellent
Including Post, get, Ajax
Frontend call CopyCodeThe Code is as follows: jquery. Post ("newdoajax. aspx", {max: 'n! ', Name: 'wsenmin'}, function (data) {alert (data )});Jquery. Get ("newdoajax. aspx", {max: 'B! ', Name: 'wsenmin'}, function
CopyCode The Code is as follows: // create an xhr object
VaR xhr;
If (window. XMLHttpRequest ){
Xhr = new XMLHttpRequest ();
}
Else if (window. activexobject ){
Xhr = new activexobject ("msxml2.xmlhttp ");
}
Else {
Throw new error ("Ajax is not
This article is intended to be reprinted, but it is basically useless and cannot help anyone! So let's get started !!
I usually don't use it as a classic or I don't need to repost it on my own, so if you see it unfortunately, if you are interested
By default, IE caches the Ajax request results for the request address. In other words, before the cache expires, multiple Ajax requests initiated for the same address will only be sent to the server for the first time. In some cases, this default
Step 1: import the jquery plugin
Copy codeThe Code is as follows:
Step 2: add the information display area in .Copy codeThe Code is as follows:
Step 3: Add JS Code to the pageCopy codeThe Code is as follows:
Step 4: Process requests in
Front-end page
Copy codeThe Code is as follows:
task category:
AppendixJquery. select. jsCopy codeThe Code is as follows :/*Ajax three-level linkageDate:Settings parameter description-----FirstUrl: the URL for retrieving first-level
First, the html code:
Copy codeThe Code is as follows:
Js Code:Copy codeThe Code is as follows: var compareContent = "the value you want to change ";If (compareContent! = ""){Document. getElementById ("compareIframe"). src =
Recently, a buddy is working on an Ajax persistent connection project. The page needs to maintain a persistent connection with the server and request a connection again after the connection times out. During the process, he asked me what to use, I
• Multiple ajax requests are sent at the same time and independent from each other.
• Multiple ajax requests are mutually dependent and must be sequenced.
• Multiple requests are sent at the same time. Only the last request is required.
1st
Copy codeThe Code is as follows: function creatajax (){
Var ajax = null;
If (window. XMLHttpRequest ){
// Create an XMLHttpRequest object for Mozilla, Netscape, Safari, and other browsers
Ajax = new XMLHttpRequest ();
If (ajax. overrideMimeType
Unfortunately, this is not the case with a legacy system I have used. Therefore, the call method is transformed by applying the ajaxPrefilter of jQuery on the client.
Copy codeThe Code is as follows:
ajaxPrefilter demo
Use comparisonCopy
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
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",
You can use it by adding a reference Dll file. /201101/tools/newtonsoft.json.netw.rar
In the jquery library, getJSON is actually called: Query. get (url, data, callback, "json ")
The parameter is also in the k/v format. The returned request is
Cross-origin operations of Ajax have always been a problem. Currently, the main solutions include:
1. JSONP (must be supported on the server)
2. IFrame (operations can only be performed between subdomains)
3. Page proxy (this is omnipotent)
4.
Index.html
Copy codeThe Code is as follows:
jQuery Ajax instance demonstration
input name:
enter the password:
ajax submit
post submission
get submit
Login. phpCopy codeThe Code is as follows: Echo json_encode (array
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