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..