如何在ASP里显示进度条?

2023-12-05 0 579

response.buffer=true

\’ 应用缓存技术.

dim lostnum

\’ 防止dmax过大而dstep过小.

dim shownum

delayshow(dstep,dmax)

sub delayshow(dstep,dmax)

\’ dmax表示要处理多少dmax()才能完成全过程,dstep表示已处理的占全过程的大致百分比.

dim total

\’ 显示所有画面.

dim dtemp

\’ 过渡变量.

total=100

dtemp=dstep

dstep=dstep+lostnum

if (dstep*total)/dmax<1 then

\’ 当画面连1%都没有时,则不画,同时用变量lostnum存放未画的总数,便于下次调用本过程时继续.

lostnum=lostnum+dtemp

else

for ccc=1 to fix((dstep*total)/dmax)

\’ 取整数.

Response.Flush

shownum=shownum+fix((dstep*total)/dmax)

lostnum=0

\’ 显示缓存里的图片,变量shownum用于存放目前已画的图片.

end if

end sub

sub showlost()

for ccc=1 to (100-shownum)

Response.Write (\”<img src=\”\”suifengqiwu/images/delay1.jpg\”\”>\”)

\’ 如果取余造成不能画完100,showlost()将余下未画的显示为已处理.

next

Response.Write \”<BR>\”

Response.Flush

end sub

收藏 (0) 打赏

感谢您的支持,我会继续努力的!

打开微信/支付宝扫一扫,即可进行扫码打赏哦,分享从这里开始,精彩与您同在
点赞 (0)

悠久资源 编程10000问 如何在ASP里显示进度条? https://www.u-9.cn/biancheng/bc10000/96449.html

常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务