看看这个
1.第一个页面Message.htm
<html>
<head>
<title>処理中....</title>
</head>
<body onblur=focus(); onmouseout=focus(); leftmargin="0" topmargin="0" scroll=no style="MARGIN: 0pt; OVERFLOW: hidden" MARGINHEIGHT="0" MARGINWIDTH="0">
<table width=100% height=100%>
<tr>
<td valign=center align=center ><font color=blue><b>数据正在处理,请耐心等待...</b></font></td>
</tr>
</table>
</body>
</html>2.在showModalDialog中添加如下代码
</head>
<script>
var width = 500;
var height = 100;
var top = (screen.availWidth - width ) / 2;
var left = (screen.availHeight - height -100) / 2;
winProcessing = window.open("Message.htm","winProcessing", "titlebar=0,fullscreen=0, top=" + top + ",screenX=" + top + ",screenY=" + left+ ",left=" + left + ",width=" + width + ",height=" + height);
</script>
<body><%
Response.Flush
%>试试看,效果非常好!!!
1.第一个页面Message.htm
<html>
<head>
<title>処理中....</title>
</head>
<body onblur=focus(); onmouseout=focus(); leftmargin="0" topmargin="0" scroll=no style="MARGIN: 0pt; OVERFLOW: hidden" MARGINHEIGHT="0" MARGINWIDTH="0">
<table width=100% height=100%>
<tr>
<td valign=center align=center ><font color=blue><b>数据正在处理,请耐心等待...</b></font></td>
</tr>
</table>
</body>
</html>2.在showModalDialog中添加如下代码
</head>
<script>
var width = 500;
var height = 100;
var top = (screen.availWidth - width ) / 2;
var left = (screen.availHeight - height -100) / 2;
winProcessing = window.open("Message.htm","winProcessing", "titlebar=0,fullscreen=0, top=" + top + ",screenX=" + top + ",screenY=" + left+ ",left=" + left + ",width=" + width + ",height=" + height);
</script>
<body><%
Response.Flush
%>试试看,效果非常好!!!
<div id=oProgressBar style="position:absolute;left:31px;top:31px;width:1px;height:14px;background:blue">
---- 以上进度条位置、大小、颜色等根据具体情况调整
</div>
</div><script>
var nWidth=0;
function incProgressBar()
{
oProgressBar.style.width = ++nWidth;
}
setTimeout(10,"incProgressBar();"); //每10毫秒加1,酌情设定
</script>简单的也可以考虑用<input type=text>
一个字符代表10%,10个字符代表100%等
<TABLE width="100%" height="100%" cellspacing=0>
<TR bgcolor="#DFDFDF">
<TD align="center" valign="center">
<TABLE border=1 width="50%" height="20px" CELLPADDING=0 CELLSPACING=0 STYLE="background-color:white" borderColorLight=#0000cd borderColorDark=#0000cd>
<TR>正在下载数据,请稍后……
<TD ID=oTdProgress WIDTH="1%" STYLE="background-color:#4169e1;border-style: double" align="center"><SPAN id="spanProgress"></TD>
<TD ID=oTdFiller></TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</DIV>
<%
Response.Flush()
%>
脚本如下function UpdateProgressBar(iProgress)
{
if (iProgress >= 100) return; oTdProgress.width = iProgress + "%";
spanProgress.innerHTML = "<b>" + iProgress + "%</b>";
}