应福建一同行网友问起,抽空做了这个示例页面,实现提交页面时出现正在初始化页面的小窗口。(在页面提交比较慢的页面中使用,可以避免用户应等待时间过长而不知页面是否正在提交,以至失去耐心)
<html>
<title>页面提交时出现等待窗口示例</title>
<head>
<SCRIPT LANGUAGE="JavaScript">
<!--
//By Dicky 2005-2-17 11:16:49
function Window_Load(Flag)
{
if (Flag == 0)
{
document.all['Loading'].style.display = 'block';
//show the window
}
else
{
document.all['Loading'].style.display = 'none';
//hide the window
}
}
//-->
</SCRIPT>
</head>
<body leftMargin=0 topMargin=50 onload="Window_Load(1);">
<div id="Loading" style="position:absolute;z-index:3;top:200px;left:250px;width:250;height:60;border-width:1;border-style:ridge;background-color:green;padding-top:10px"><center><table border="0"><tr><td valign="middle"><img src="cursor.gif" border="0" WIDTH="30" HEIGHT="30"></td><td> </td><td valign="middle"><span id=txtLoading0 style="font-size:14px;">正在初始化页面,请稍候...</span><br><span id=txtLoading1 style="font-size:14px;">Loading,please wait...</span></td></tr></table></center></div>
<form name="form1" method="post" action="" onSubmit="Window_Load(0);">
<center>页面提交时出现等待窗口示例<input name=submit type=submit value='提交'>
</center>
</form>
</body>
</html>