Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有这个脚本:
$.ajax({ type: "GET", url: '/get.php?id=' + c + '&type=1', dataType: "html" }).done(function (a) { $(".playerr:eq(" + b + ")").html(a).show() });
如何添加加载图像?
您可以使用beforeSendandsuccess或 done 来显示和隐藏加载图像
beforeSend
success
$.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(); });