How to display a loading image gif or message while PHP is executing a batch file?

前端 未结 3 2072
无人及你
无人及你 2021-02-01 11:29

I\'ve been searching on the net for the answer, but couldn\'t find.

How could I show some loading messsage or gif while the long executing script is running. I tested a

3条回答
  •  盖世英雄少女心
    2021-02-01 12:16

    You can request your php file from another web page using AJAX. Then you have your javascript display a loading.gif until the server answers the request.

    You could use jQuery for this: http://api.jquery.com/load/

提交回复
热议问题