设为首页收藏本站

新微赢技术网

 找回密码
 注册
搜索
热搜: 回贴
查看: 45|回复: 1
打印 上一主题 下一主题

还是关于进度条的问题

[复制链接]
跳转到指定楼层
1#
发表于 2010-1-20 00:54:27 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
<script language="javascript" >
AddProcessbar();
var bwidth=0;
var swidth = document.all.waiting.clientWidth;
function CheckIsProcessBar(obj)
{
if (obj.IsShowProcessBar=="True")
{
return false;
}
else
{
return true;
}
}
function CheckClick(e)
{
if (e == 1)
{
if (bwidth<swidth*0.98){
bwidth += (swidth - bwidth) * 0.025;
if (document.all)document.sbar.width = bwidth;
else document.rating.clip.width = bwidth;
setTimeout('CheckClick(1);',150);
}
}
else
{
if(document.all)
{
if(document.all.waiting.style.visibility == 'visible')
{document.all.waiting.style.visibility = 'hidden';
bwidth = 1;}
whichIt = event.srcElement;
while (CheckIsProcessBar(whichIt))
{
whichIt = whichIt.parentElement;
if (whichIt == null)return true;
}

document.all.waiting.style.pixelTop = (document.body.offsetHeight - document.all.waiting.clientHeight) / 2 + document.body.scrollTop;
document.all.waiting.style.pixelLeft = (document.body.offsetWidth - document.all.waiting.clientWidth) / 2 + document.body.scrollLeft;
document.all.waiting.style.visibility = 'visible';
if(!bwidth)CheckClick(1);
bwidth = 1;
}
else
{
if(document.waiting.visibility == 'show')
{document.waiting.visibility = 'hide';
document.rating.visibility = 'hide';
bwidth = 1;}
if(e.target.href.toString() != '')
{
document.waiting.top = (window.innerHeight - document.waiting.clip.height) / 2 + self.pageYOffset;
document.waiting.left = (window.innerWidth - document.waiting.clip.width) / 2 + self.pageXOffset;
document.waiting.visibility = 'show';
document.rating.top = (window.innerHeight - document.waiting.clip.height) / 2 + self.pageYOffset+document.waiting.clip.height-10;
document.rating.left = (window.innerWidth - document.waiting.clip.width) / 2 + self.pageXOffset;
document.rating.visibility = 'show';
if(!bwidth)CheckClick(1);
bwidth = 1;
}
}
return true;
}
}
function AddProcessbar()
{
var Str=""
Str+= "<div id=waiting style=position:absolute;top:50px;left:100px;z-index:1;visibility:hidden >";
Str+= "<layer name=waiting visibility=visible zIndex=2 >"
Str+= "<table border=2 cellspacing=1 cellpadding=0 bordercolorlight=#FFFFFF bordercolordark=#C0C0C0 bgcolor=#E0E0E0>"
[知识问答ωωω.χiuGoo.сom]
Str+= " <tr>"
Str+= " <td bgcolor=#E0E0E0 height=30px width=300px align=center>"
Str+= " <font color=black>系统正在处理中,请等待...</font>"
Str+= " </td>"
Str+= " </tr>"
Str+= " <tr>"
Str+= " <td bgcolor=#E0E0E0>"
Str+= " <img width=1 height=10 name=sbar style=background-color:#6699cc>"
Str+= " </td>"
Str+= " </tr>"
Str+= "</table> "
Str+= "</layer>"
Str+= "</div>"
document.write(Str)
if(document.all)document.onclick = CheckClick;
}
</script>

<HTML>
<HEAD>
<script language="javascript" src="ShowProcessBar.js"></script>
</HEAD>
<BODY>
<input type=button value="开始" IsShowProcessBar="True">
 </P>
</HTML>
上面是一段完整的进度条源代码,点击 开始 按钮 就可以看到进度条,可问题是,这样的进度条没有什么用,关键是我怎么才能将进度条和我的程序结合起来,比如说有一个表,记录很多,我需要对每个纪录进行处理,我怎么才能够在进度条上显示我处理表内记录的进度

如果看不到进度条,可以将上面的源代码全部复制到 FrontPage 里面预览可以了
您需要登录后才可以回帖 登录 | 注册

本版积分规则

申请友链|小黑屋|最新主题|手机版|新微赢技术网 ( 苏ICP备08020429号 )  

GMT+8, 2024-11-20 04:41 , Processed in 0.075002 second(s), 9 queries , Gzip On, Memcache On.

Powered by xuexi

© 2001-2013 HaiAn.Com.Cn Inc. 寰耽

快速回复 返回顶部 返回列表