gpt4 book ai didi

asp.net - 在框架中加载内容时显示加载指示器

转载 作者:太空宇宙 更新时间:2023-11-04 15:42:21 24 4
gpt4 key购买 nike

在框架中加载内容时显示加载指示器的代码1) 当回发/提交发生在 iframe 内的表单中时

最佳答案

您可以绑定(bind)到 ajaxStartajaxStop global (ajax) events如下:

$("#loading").bind("ajaxStart", function(){
$(this).fadeIn("slow");
}).bind("ajaxStop", function(){
$(this).fadeOut("slow");
});

假设 loading 是您的加载指示器 div/span 的 ID。

如果你想要一个更漂亮的解决方案,看看很棒的 blockUI插入。使用 blockUI 的等价物:

$().ajaxStart($.blockUI)
.ajaxStop($.unblockUI);

关于asp.net - 在框架中加载内容时显示加载指示器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1445906/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com