我有gridview其中有700行。我已经把页面上的一个AJAX加载器在这link。加载器消失时,仍然有2-3分钟加载数据完全。我想显示加载器,直到页面加载完全。我怎样才能做到这一点?显示加载器,直到整个页面完全加载在asp.net
<script type="text/javascript">
function ShowProgress() {
setTimeout(function() {
var 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 });
}, 1000);
}
$(document).ready(function() {
$('#Button1').click(function() {
ShowProgress();
});
});
</script>
<style type="text/css">
.modal
{
position: fixed;
top: 0;
left: 0;
background-color: black;
z-index: 99;
opacity: 0.8;
filter: alpha(opacity=80);
-moz-opacity: 0.8;
min-height: 100%;
width: 100%;
}
.loading
{
font-family: Arial;
font-size: 10pt;
border: 5px solid #67CFF5;
width: 200px;
height: 100px;
display: none;
position: fixed;
background-color: White;
z-index: 999;
}
</style>
<div class="loading" align="center">
Loading. Please wait.<br />
<br />
<img src="loader.gif" alt="" />
</div>
使用'有没有AJAX call.loader显示在按钮的单击事件在客户端 – TheUknown
?你怎么知道网格数据绑定成功?你使用什么网格?您可以使用网格绑定事件来移除加载 –
那么如何填充网格数据.done'功能 – TheUknown