在加载Web页面时显示正在等待的窗体
2012-09-24 21:15
525 查看
1.在css样式表里加入
/* 页面加载特效 */
.Loading
{
font-size: 12px;
font-family: 宋体;
width: 100pt;
height: 14pt;
position: absolute;
z-index: 3;
background-color: #f5f5f5;
cursor: wait;
border-right: #000000 1px ridge;
border-top: #000000 1px ridge;
border-left: #000000 1px ridge;
border-bottom: #000000 1px ridge;
filter: alpha(opacity=82);
-moz-opacity: 0.8;
opacity: 0.8;
left: expression((this.parentElement.offsetWidth-this.offsetWidth)/2);
top: expression((document.body.clientHeight-this.style.pixelHeight)/3+document.body.scrollTop);
}
.Loading_Close
{
CURSOR: hand;
color:#000000;
font-size:12px;
font-weight:bold;
margin-right:4px;
}
2.loading.js
//页面加载中效果开始
document.writeln("<div id=\"loadingDiv\" class=\"Loading\">");
document.writeln(" <table>");
document.writeln(" <tr>");
document.writeln(" <td align=\"right\">页面加载中请稍候 <span title=关闭 class=\"Loading_Close\" onClick=\"document.all.loadingDiv.style.display='none'\">×</span>");
document.writeln(" <\/td>");
document.writeln(" <\/tr>");
document.writeln(" <tr>");
document.writeln(" <td valign=\"middle\">");
document.writeln(" <img src=\"../images/Loading.gif\" border=\"0\" ><\/td>");
document.writeln(" <\/tr>");
document.writeln(" <\/table>");
document.writeln("<\/div>")
3.在<head>后加入
<link href="../Images/Style.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/javascript" src="/js/loading.js"></script>
<script type="text/javascript">
function Window_Load(Flag)
{
// debugger;
if (Flag == 0)
{
document.all['loadingDiv'].style.display = 'block';
//show the window
}
else
{
document.all['loadingDiv'].style.display = 'none';
//hide the window
}
}
</script>
4.在<form>上加入
<form id="form1" runat="server" method="post" onsubmit="Window_Load(0);">
5.在</html>上加入
<script language="JavaScript" type="text/javascript">Window_Load(1);</script>
/* 页面加载特效 */
.Loading
{
font-size: 12px;
font-family: 宋体;
width: 100pt;
height: 14pt;
position: absolute;
z-index: 3;
background-color: #f5f5f5;
cursor: wait;
border-right: #000000 1px ridge;
border-top: #000000 1px ridge;
border-left: #000000 1px ridge;
border-bottom: #000000 1px ridge;
filter: alpha(opacity=82);
-moz-opacity: 0.8;
opacity: 0.8;
left: expression((this.parentElement.offsetWidth-this.offsetWidth)/2);
top: expression((document.body.clientHeight-this.style.pixelHeight)/3+document.body.scrollTop);
}
.Loading_Close
{
CURSOR: hand;
color:#000000;
font-size:12px;
font-weight:bold;
margin-right:4px;
}
2.loading.js
//页面加载中效果开始
document.writeln("<div id=\"loadingDiv\" class=\"Loading\">");
document.writeln(" <table>");
document.writeln(" <tr>");
document.writeln(" <td align=\"right\">页面加载中请稍候 <span title=关闭 class=\"Loading_Close\" onClick=\"document.all.loadingDiv.style.display='none'\">×</span>");
document.writeln(" <\/td>");
document.writeln(" <\/tr>");
document.writeln(" <tr>");
document.writeln(" <td valign=\"middle\">");
document.writeln(" <img src=\"../images/Loading.gif\" border=\"0\" ><\/td>");
document.writeln(" <\/tr>");
document.writeln(" <\/table>");
document.writeln("<\/div>")
3.在<head>后加入
<link href="../Images/Style.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/javascript" src="/js/loading.js"></script>
<script type="text/javascript">
function Window_Load(Flag)
{
// debugger;
if (Flag == 0)
{
document.all['loadingDiv'].style.display = 'block';
//show the window
}
else
{
document.all['loadingDiv'].style.display = 'none';
//hide the window
}
}
</script>
4.在<form>上加入
<form id="form1" runat="server" method="post" onsubmit="Window_Load(0);">
5.在</html>上加入
<script language="JavaScript" type="text/javascript">Window_Load(1);</script>
相关文章推荐
- WebDriver- 等待页面加载元素完成
- Webview--如何让加载进来的页面自适应手机屏幕分辨率居中显示
- WebDriver拾级而上·之九 等待页面加载元素完成
- android原生WebView打开h5页面加载显示不完整错乱问题
- Webview--如何让加载进来的页面自适应手机屏幕分辨率居中显示
- selenium webdriver(Appium)如何等待页面元素加载完成
- selenium webdriver(Appium)如何等待页面元素加载完成
- [WebDriver]等待页面加载,(转载出自jarvi)
- android webview 加载图片一直显示正在加载中
- Android 使用WebView加载含有echarts的页面,截图不显示的解决方式
- Webview--如何让加载进来的页面自适应手机屏幕分辨率居中显示
- Webview--如何让加载进来的页面自适应手机屏幕分辨率居中显示
- aspx页面用一个遮罩层显示正在加载,加载完后隐藏该div
- 让你的webview在应用里面跳并且显示正在加载
- webview加载https页面图片不能显示问题
- selenium webdriver学习(十一)------------如何等待页面元素加载完成
- aspx页面用一个遮罩层显示正在加载,加载完后隐藏该div
- 页面请求完成显示(页面未加载完成时等待的效果)
- 【Android】WebView加载https页面不能正常显示资源问题
- Cocos2d-X 对刚进入游戏时的实现(即页面显示“正在加载。。。。。”)