asyn ajax jQuery调用 [英] asyn ajax jquery call
本文介绍了asyn ajax jQuery调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在使用带有jQuery的ajax来重新调用asyc时遇到问题....
代码如下:
i have problem regading my asyc calls using ajax with jquery....
the code is like:
$("#loading").css("display", "block");
for(i=0; i < aValue; i++)
{
$.ajax({
url: '/link1/getdata',
type: "GET",
cache: false,
async: false,
data: {data : i}
success: function(result) {
$("#loading").css("display", "none");
},
});
}
这对于mozilla来说效果很好...但是"
this works well for mozilla...but "
async: false
在 google chrome中无法正常工作..
如果"
" doesnt works properly in google chrome..
if "
async: false
,则在Chrome中正在加载img不会出现..
请帮助我..
" then in chrome the loading img does not appear ..
please help me on this..
推荐答案
(" ).css( display", 阻止"); for (i = 0 ; i >< aValue; i ++) {
("#loading").css("display", "block"); for(i=0; i < aValue; i++) {
.ajax({ 网址:' /link1/getdata', 类型:" , 缓存: false , 异步:错误, 数据:{data:i} 成功:函数(结果){
.ajax({ url: '/link1/getdata', type: "GET", cache: false, async: false, data: {data : i} success: function(result) {
(" ).css(" ," 没有"); }, }); }
("#loading").css("display", "none"); }, }); }
这对于mozilla来说效果很好...但是"
this works well for mozilla...but "
async: false
在 google chrome中无法正常工作..
如果"
" doesnt works properly in google chrome..
if "
async: false
,则在Chrome中正在加载img不会出现..
请帮我解决这个问题.
" then in chrome the loading img does not appear ..
please help me on this..
这篇关于asyn ajax jQuery调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文