The Async:false of jquery, this attribute
The default is true: Asynchronous, false: Sync.
| The code is as follows |
Copy Code |
|
$.ajax ({
Type: "POST",
URL: "Path",
cache:false,
async:false,
dataType: ($.browser.msie)? "Text": "xml",
success:function (xmlobj) {
}
});
$.ajax ({
type: "Post",
URL: "Path",
cache: False,
async:false,
datatype: ($.browser.msie)? ' Text ': ' xml ',
success:function (xmlobj) {
}
}); |
So there is no problem in other browsers, but under the FF is a problem, let's look at the solution
Async default is True, which is asynchronous, $. After Ajax executes, it will continue to follow the footsteps of Ajax until the server side returns data, triggering $. The success method in Ajax. Two threads are executed at this time.
My flash-screen situation is:
| The code is as follows |
Copy Code |
$.ajax ({
Type: "Post",
URL: "index.php",
Data: {},
Async:false,
Beforesend:function () {},
Success:function (data) {
//...
},
Complete:function () {}
});
|
Here, my async is set to False, the original intention is to return the data and then execute $. Ajax behind the script, did not think this place has led to a splash screen in Firefox browser. (Firefox 11.0), the scroll bar down to the bottom of the trigger Ajax situation. Splash screen
Solutions
, successfully resolved the Firefox browser scroll bar down to the bottom of the trigger Ajax flash screen problem.