0
以下代码是在.NET应用程序的异步回发期间显示带灰色背景的div弹出式加载器。如何从HideProgress()中的“body”中删除CSS类模式?从创建的div中删除cs
function ShowProgress() {
setTimeout(function() {
modal = $('<div />');
modal.addClass("modal");
$('body').append(modal);
var loading = $(".loading");
loading.show();
var top = Math.max($(window).height()/2 - loading[0].offsetHeight/2, 0);
var left = Math.max($(window).width()/2 - loading[0].offsetWidth/2, 0);
loading.css({ top: top, left: left });
}, 200);
}
function HideProgress() {
//alert('hideloading');
document.getElementById("loading").onsubmit = null;
document.getElementById('loading').style.display = 'none';
document.getElementById("body").onsubmit = null;
document.getElementById('body').style.display = 'none';
//alert('done');
}
谢谢 - 我认为保罗打了你几秒钟的答案。我会upvote,但我还不能! – Biggs