我有这个脚本:
$.ajax({
type: "GET",
url: '/get.php?id=' + c + '&type=1',
dataType: "html"
}).done(function (a) {
$(".playerr:eq(" + b + ")").html(a).show()
});如何添加加载镜像?
发布于 2013-08-19 19:40:47
您可以使用beforeSend和success或done来显示和隐藏加载图像
$.ajax({
type: "GET",
url: '/get.php?id=' + c + '&type=1',
dataType: "html"
}).done(function (a) {
$(".playerr:eq(" + b + ")").html(a).show();
$("#img1").hide();
}).beforeSend(function(){
$("#img1").show();
});https://stackoverflow.com/questions/18312867
复制相似问题