Ajax loading background data is not so thin.
Look at the following code, first place the code on the front
<div id= "Loadgif" style= "width:66px;height:66px;position:absolute;top:50%;left:50%;" >
</div>
In the JS script file first to hide this picture animation
The code is as follows
$ (document). Ready (function () {$ ("#loadgif"). Hide ();});
Then asynchronous Ajax submits the request code as follows
$ (function () {
var find = new Find ();
Alert (find. Template);
$.ajaxsetup ({
cache:false,
async:true,
global:false,
type: "POST"
});
$ ("#queryBtn"). Click (function () {$ ("#loadgif"). Show (); Get ()});
.....................
Attention:
Async:true,
Call the animation when you click the Querybtn button
Then submit the request
When you receive the request,
The effect is as follows:
The above is a small set of jquery Ajax to introduce the load data asynchronous display animation, hope for everyone to help, if you have any questions please give me a message, small series will promptly reply to everyone. Here also thank you very much for the cloud Habitat Community website support!