页面提交时出现等待窗口示例

王朝other·作者佚名  2006-01-09
宽屏版  字体: |||超大  

应福建一同行网友问起,抽空做了这个示例页面,实现提交页面时出现正在初始化页面的小窗口。(在页面提交比较慢的页面中使用,可以避免用户应等待时间过长而不知页面是否正在提交,以至失去耐心)

<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>&nbsp;&nbsp;</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>

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
© 2005- 王朝网络 版权所有