且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

显示加载内容/图像,同时等待

更新时间:2022-12-09 20:10:57

当你说显示加载消息,您正在使用AJAX我间preT。在阿贾克斯开始您可以显示图像,并在阿贾克斯complete回调可以隐藏加载图像。请提供一些code例子如果可能的话。

When you say displaying loading message, I interpret that you're using ajax. In ajax start you can display that image, and in ajax complete callback you can hide the loading image. Please provide some code examples if possible.

在情况下,如果jQuery的AJAX,你可以使用:

In case if jQuery ajax, you can use:

$('#loaderImage').show();
$.ajax({
    // Other ajax parameters
    success: function () {
       // hiding the image here
       $('#loaderImage').hide();
    }
});