动网论坛,站长建站首选,国内使用量最多的论坛软件 动网论坛官方技术讨论区 站长工具 申请属于您自己的免费论坛
首页 | 新闻资讯 | 网站运营 | 网络编程 | 数据库 | 服务器 | 网页设计 | 图像媒体 | 网络应用 | 搜索优化 | 资源下载 | 动网主机 | DVBOX
    本站内  互联网 ASP论坛  ASP.Net论坛  PHP论坛
  
   VBScript → 阅读文章

 VBScript的扫描进度条程序

作者来源: 
阅读 数 163 人次 , 2006-4-3 0:01:00 


<title>进度条</title>
<style>
body {background: #ccccff} body { overflow:hidden }
p.txtstyle {color: navy; font-family: verdana; font-size: 10pt; font-weight: bold; margin-left: 10px }
input.pbstyle {color: navy; font-family: wingdings; font-size: 10pt; background: silver; height: 20px; width: 340px }
</style>
<div id="objprogress" class="outer"></div>
<center>
<b>
<span id=txtmilestone class='txtstyle' style='margin-left: 10px'></span>
<font color=green>
<span id=txtremarks class='txtstyle' style='margin-left: 10px'></span>
</font>
<b>
<br>
<br>
<input type='text' id='pbtext' class='pbstyle' value='' >
<br>
<br>
<input type='button' value='cancel' onclick='setreturnflag("quit")' >
</center>
<form name='secret' > <input type='hidden' name='pubflag' value='run' ></form>
<script language='vbscript' >
sub setreturnflag(sflag)
secret.pubflag.value = sflag
txtmilestone.style.color = "red"
txtremarks.style.color = "red"
end sub
function pctcomplete(npct)
pbtext.value = string(npct," ") & string(4,"n")
end function
sub updateprogress()
dim intstep
dim intdirection

if (isnull(objprogress.getattribute("step")) = true) then
intstep = 0
else
intstep = objprogress.step
end if

if (isnull(objprogress.getattribute("direction"))=true) then
intdirection = 0
else
intdirection = objprogress.direction
end if

if intdirection=0 then
intstep = intstep + 1
else
intstep = intstep - 1
end if

call pctcomplete(intstep)

if intstep>=23 then
intdirection=1
end if
if intstep<=0 then
intdirection=0
end if
objprogress.setattribute "step", intstep
objprogress.setattribute "direction", intdirection
window.settimeout getref("updateprogress"), 80
end sub
sub dialoghardtimeout()
setreturnflag("quit")
end sub
sub window_onload()
theleft = (screen.availwidth - document.body.clientwidth) / 2
thetop = (screen.availheight - document.body.clientheight) / 2
window.moveto theleft,thetop
window.settimeout getref("updateprogress"), 80
window.settimeout getref("dialoghardtimeout"), 3600000
end sub
</script>

 本文Tags组网  
 收藏本文  打印本文  论坛讨论  关闭窗口
· 上一篇:VBScript来控制ICF的启动
· 下一篇:VBScript实现对Windows注册表的修改
· VBScript 中其他常数
· VBScript CDate 函数
· VBScript CCur 函数
· VBScript CInt 函数
· VBScript 数据类型


关于本站 | 联系我们 | 业务合作 | 客户案例 | 诚聘英才 | 广告合作 | 收藏本站
海口动网先锋网络科技有限公司版权所有
Copyright © 2000 - 2006 Cndw.Com
中华人民共和国电信与信息服务业务经营许可证编号 琼 ICP 020077