<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>三包管理系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0">
<table cellpadding="0" cellspacing="0" border="0" style="width: 330px; height: 196px"><tr><td></td></tr></table>
<table border=0 cellpadding=0 cellspacing=0 width="100%" height="100%">
<tr>
<form name=loading>
<td align=center>
<p><font color=gray size=4pt>
<img src="images/waiting.gif" border=0 /> 正载入三包管理系统,请稍候.......</font></p>
<p>
<input type=text name=chart size=46 style="font-family:Arial;
font-weight:bolder; color:gray;
background-color:white; padding:0px; border-style:none;">
<br>
<input type=text name=percent size=46 style="font-family:Arial;
color:gray; text-align:center;
border-width:medium; border-style:none;">
<script>
var bar = 0
var line = "||"
var amount ="||"
count()
function count(){
bar= bar+2
amount =amount + line
document.loading.chart.value=amount
document.loading.percent.value=bar+"%"
if (bar<99)
{setTimeout("count()",50);}
else
{
window.open("index.htm","","fullscreen=1,menubar=0,toolbar=0,directories=0,location=0,status=1,scrollbars=0");
}}
</script></p>
</td>
</form>
</tr>
</table>
</body>
</html>楼主试试这个看看,我目前用的是这个。
你可能理解错了我的意思我要的是通过javascript判断页面加载到什么程度了
不是你这种给个时间循环显示某个信息然后才显示页面
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<script language="javascript" type="text/javascript">
var xmlHttp = null;
var loadbarStyle = null;
var loadbar = null;function createXMLHttp() {
loadbarStyle = document.getElementById('loadbar').style;
loadbar = document.getElementById('loadbar')
xmlHttp = new XMLHttpRequest(); xmlHttp.open('GET', 'http://topic.csdn.net/u/20081012/12/2eb66105-54f3-4aeb-b847-31a9e8c3d08b.html', true);
// xmlHttp.open('GET', 'Noname1.html', true); xmlHttp.onreadystatechange = function () {
if (xmlHttp.readyState == 4) {
if (xmlHttp.status == 200 || xmlHttp.status == 0) { loadbar.innerHTML = xmlHttp.responseText;
}
else {
loadbar.innerHTML = 'Loading ERROR!\n' + xmlHttp.status;
}
}
else if (xmlHttp.readyState == 1) {
loadbarStyle.width = '25%';
loadbar.innerHTML = '25%';
}
else if (xmlHttp.readyState == 2) {
loadbarStyle.width = '50%';
loadbar.innerHTML = '50%';
}
else if (xmlHttp.readyState == 3) {
loadbarStyle.width = '75%';
loadbar.innerHTML = '75%';
}
} xmlHttp.send(null);
}
</script>
</HEAD>
<BODY>
<a href="javascript:void(null);" onclick="createXMLHttp();">TEST</a><br />
<div id="container" style="width: 1000px; height: 500px; border: 1px solid #999999; background-color: #FFFFCC; ">
<div id="loadbar" style="width: 0px; height: 20px; background-color: #00CCFF; ">0%</div>
</div>
</BODY>
</HTML>
随便写了个,也不知道对不对.顺便说一句,如果你没有用WEBServer运行这个文件,访问远程地址是不被允许的.把这个文件放到Tomcat跑一下看看行不行.
用gif图片吧
但是必须使用到webservice
这样放到程序里面很麻烦
把左边的菜单加载完成之后,推进进度条到30%
把主体列表加载完成之后,推进到80%
bottom加载完成后,推进到100%,
然后隐藏进度条,显示实际内容
把左边的菜单加载完成之后,向前推进20%
把主体列表加载完成之后,向前推进50% --此处如果采用iframe或者ajax,那么需要做一些特殊的处理,来推进进度条
bottom加载完成后,向前推进20%,
当发现进度条》=100%时,隐藏进度条,显示实际内容
眼睛不好 看掉了一个字另外我用的是IIS...不是Tomcat
很遗憾 我要加载的页面就是在 iframe 里面