layer.msg("加载中", {
title: false,
icon: 16 // 加载图标
});
layer.load(1,{ // 此处1没有意义,随便写个东西
icon: 0, // 0~2 ,0比较好
time: 888,
shade: [0.5,'black'] // 黑色透明度0.5背景
});
$.ajax({
type:'post',
url: 'index.php',
dataType: 'json',
data: '',
error: function(XMLHttpRequest, status, thrownError) {
layer.close(l);
layer.msg('网络繁忙,请稍后重试...');
return false;
},
success: function(msg) {
layer.close(l);
}
});