前端代码如下(jq)
function checkNow() {
top.$("#loading_background,#loading_manage").show();
var mode = '';
if ("http://" + window.location.host != top.SomeThing.data.getDIAsArray('UserCheckbaseUrl')[0]["F_ItemValue"]) {
mode = 'test';
}
else {
mode = 'formal';
}
$.ajax({
url: '/API/Base/SomeThing/nonlogin/SomeThingEvent/SomeThingCheck',
data: { mode: mode },
type: 'get',
dataType: "json",
async: true,
cache: false,
beforeSend: function () {
learun.loading({ isShow: true });
},
complete: function () {
learun.loading({ isShow: false });
},
success: function (data) {
dialogMsg("检查完成", 0);
}
});
导致问题
当async为flase的时候,以下代码失效 ,即在加载动画出不来
$("#vvv").append('<img src="http://images.cnblogs.com/loading.gif">');
top.$("#loading_background,#loading_manage").show();
learun.loading({ isShow: true });
|