100分求java,javascript 或jsp实现的进度条模式程序例子 求java,javascript 或jsp实现的进度条模式程序例子,描述:点击按钮后,页面显示任务执行的百分比,下面进度条慢慢的变长,直到任务执行完毕后,跳到结果页面。最好有注释。谢谢各位大虾的不吝赐教先。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <title>进度条--阿会楠练习作品</title> <style type="text/css"> body{ text-align:center; } .graph{ width:450px; border:1px solid #F8B3D0; height:25px; } #bar{ display:block; background:#FFE7F4; float:left; height:100%; text-align:center; } #barNum{ positon:absolute; } </style> <script type="text/javascript"> function $(obj){ return document.getElementById(obj); } function go(){ $("bar").style.width = parseInt($("bar").style.width) + 1 + "%"; $("bar").innerHTML = $("bar").style.width; if($("bar").style.width == "100%"){ window.clearInterval(bar); } } var bar = window.setInterval("go()",50); window.onload = function(){ bar; } </script> </head> <body> <div class="graph"> <strong id="bar" style="width:1%;"></strong> </div> </body> </html> 这个不错,通俗易懂,跳转部分你去改造吧 网上很多啊,看看这个http://blog.csdn.net/java_283066589/archive/2007/03/17/1532118.aspx <html><head><title>正在載入</title><meta http-equiv="Content-Type" c></head><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0"><table border=0 cellpadding=0 cellspacing=0 width="100%" height="100%"><tr> <form name=loading><td align=center> <p><font color=gray>正在載入首頁,請稍候.......</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()",100); } else { window.location = "http://www.zcool.com.cn/";} }</script></p></td></form></tr></table></body></html> 进度条是“|||||” 按照百分比增加的。挺实用美观的。你可以按照自己的需求进行改造的。而且也不难。 <style>#load{width:500px;height:25px;border:1px #000 solid;}#loading{position:absolute;z-index:2;height:23;filter:progid:DXImageTransform.microsoft.gradient(gradienttype=1,startColorStr=white,endColorStr=#39867b);}#loadtext{position:absolute;z-index:3;width:100%;height:100%;line-height:23px;text-align:center;}</style><div id="load"><div id="loading"></div><div id="loadtext">1%</div></div><script>var i=0;function test(){i++;document.getElementById("loading").style.width = i + "%";document.getElementById("loadtext").innerText = i + "%";if(i<100)setTimeout("test()",200);}setTimeout("test()",200);</script> 一开始我也觉得很难,后来自己写了个,也不算太难。用Ajax启动Servlet,此Servlet会把进度信息放入Session中,然后在页面中Ajax请求获得Session中的进度信息,再配合js和css完成进度。 各位大侠,救命!! html 框架问题。 马上毕业 给自己一个目标了 有经验的帮忙指正一下 sql查询语句 我的applet中出现了一个问题,请问是怎么回事? 关于JavaBean在JSP页面调用的问题(初学) 新手请教:使用TOMCAT无法打开html页面 论坛中有详细介绍JSP乱码显示解决方法的吗?? 好久没来了!做个一阵儿VB,现在感觉还是JAVA最亲切!~ 有高手用过ireport制作组合报表 求一个电子商务网站做参考 struts2问题(急)
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>进度条--阿会楠练习作品</title>
<style type="text/css">
body{
text-align:center;
}
.graph{
width:450px;
border:1px solid #F8B3D0;
height:25px;
}
#bar{
display:block;
background:#FFE7F4;
float:left;
height:100%;
text-align:center;
}
#barNum{
positon:absolute;
}
</style>
<script type="text/javascript">
function $(obj){
return document.getElementById(obj);
}
function go(){
$("bar").style.width = parseInt($("bar").style.width) + 1 + "%";
$("bar").innerHTML = $("bar").style.width;
if($("bar").style.width == "100%"){
window.clearInterval(bar);
} }
var bar = window.setInterval("go()",50);
window.onload = function(){
bar;
}
</script>
</head>
<body>
<div class="graph">
<strong id="bar" style="width:1%;"></strong>
</div>
</body>
</html>
这个不错,通俗易懂,跳转部分你去改造吧
http://blog.csdn.net/java_283066589/archive/2007/03/17/1532118.aspx
<head>
<title>正在載入</title>
<meta http-equiv="Content-Type" c>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0">
<table border=0 cellpadding=0 cellspacing=0 width="100%" height="100%">
<tr>
<form name=loading>
<td align=center>
<p><font color=gray>正在載入首頁,請稍候.......</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()",100);
}
else
{
window.location = "http://www.zcool.com.cn/";}
}
</script>
</p>
</td>
</form>
</tr>
</table>
</body>
</html>
进度条是“|||||” 按照百分比增加的。挺实用美观的。你可以按照自己的需求进行改造的。而且也不难。
#load{width:500px;height:25px;border:1px #000 solid;}
#loading{position:absolute;z-index:2;height:23;filter:progid:DXImageTransform.microsoft.gradient(gradienttype=1,startColorStr=white,endColorStr=#39867b);}
#loadtext{position:absolute;z-index:3;width:100%;height:100%;line-height:23px;text-align:center;}
</style>
<div id="load"><div id="loading"></div><div id="loadtext">1%</div></div>
<script>
var i=0;
function test(){
i++;
document.getElementById("loading").style.width = i + "%";
document.getElementById("loadtext").innerText = i + "%";
if(i<100)setTimeout("test()",200);
}
setTimeout("test()",200);
</script>
用Ajax启动Servlet,此Servlet会把进度信息放入Session中,然后在页面中Ajax请求获得Session中的进度信息,再配合js和css完成进度。