Ajax loading background data is not as detailed.

Look at the following code first place the code on the foreground

<img src="../../images/loading1.gif" />

First hide this picture animation in the js script file

code show as below

$(document) .ready (function () {$("#loadgif"). hide ();});

Then the asynchronous ajax submit request code is as follows

$(function () {
var find=new find ();
$.ajaxsetup ({
$("#querybtn"). click (function () {$("#loadgif"). show ();find.get ()});




Call animation when click querybtn button

$("#loadgif"). show ();

Then submit the request

After receiving the request

$("#loadgif"). hide ();

The effect is as follows:

  • Previous 3 ways to implement paging in php
  • Next JS method to get the keys pressed by the keyboard and display them on the page