gpt4 book ai didi

Jquery ajaxStop 不适用于 IE

转载 作者:行者123 更新时间:2023-12-01 06:07:34 26 4
gpt4 key购买 nike

当我使用ajax加载页面时,我尝试使用flash或文本来显示页面正在加载。下面的代码在 Firefox 和 Chrome 上运行良好,但不适用于 IE。我不知道问题所在。看来类(class)根本没有停止。

这是我的 Jquery 脚本

$(document).ready(function(){
$.ajaxSetup({cache: false});
$demo='tse';
$('#loading').ajaxStart(function(){
$(this).show();
}).ajaxStop(function(){

$(this).hide();
});

$('#ui_demo_1').click(function(){
$.get('ajax_feed.php',{
demo:$demo
},function(data){
$('#ui_demo').html(data).fadeIn(700).css('font-weight','italic');

return false;
});
return false;
});
});

这是我的 html 代码:

<a href="#" id="ui_demo_1">Click here</a>
<span id="loading">
Loading ...
</span>
<div id="ui_demo">

</div>

如有任何帮助,请...

最佳答案

您的 ajax 调用的成功函数可能因某些错误而失败。我有一个类似的案例。 IE 不会告诉您任何信息,只是不会触发 ajaxStop

关于Jquery ajaxStop 不适用于 IE,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4099564/

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