帮我看看这个脚本,怎样能修改。。。在线给分

ludy 2002-11-15 10:30:19
帮我看看这个脚本,怎样能修改loading速度,让进度条走的慢点,最好慢一倍。

<html>
<head>
<title>loading00</title>
<META http-equiv=Content-Type content="text/html; charset=gb2312">


<SCRIPT type=text/javascript>
<!--
var ie5 = (document.all && document.getElementsByTagName);
var step = 0;
function setSB(v, el, inforEl, message) {
if (ie5 || document.readyState == "complete") {
filterEl = el.children[0];
valueEl = el.children[1];

if (filterEl.style.pixelWidth > 0) {
var filterBackup = filterEl.style.filter;
filterEl.style.filter = "";
filterEl.style.filter = filterBackup;
}

filterEl.style.width = v + "%";
valueEl.innerText = v + "%";
inforEl.innerText = message;
}
}
function setSBByStep(v, el, inforEl, message) {
if (ie5 || document.readyState == "complete") {
step = step + v;
filterEl = el.children[0];
valueEl = el.children[1];

if (filterEl.style.pixelWidth > 0) {
var filterBackup = filterEl.style.filter;
filterEl.style.filter = "";
filterEl.style.filter = filterBackup;
}

filterEl.style.width = step + "%";
valueEl.innerText = step + "%"
inforEl.innerText = message;
}
}

function fakeProgress(v, el) {
if (v >= 101)

//输入 Loading 过后跳转的网址
location.href="http://www.pcedu.com.cn";
else {
setSB(v, el, infor, "LOADING ...");
window.setTimeout("fakeProgress(" + (v + 1) + ", document.all['" + el.id + "'])", 20);
}
}

//-->
</SCRIPT>


</head>

<BODY onload="fakeProgress(0,sb)" topmargin=100 bgcolor="#FFFFFF">


<!-- Status Bar Starts -->
<div align=center>
<DIV id=sb
style="BORDER-RIGHT: white 0px inset; BORDER-TOP: white 0px inset; BACKGROUND: white; BORDER-LEFT: white 0px inset; WIDTH: 200px; BORDER-BOTTOM: white 0px inset; HEIGHT: 20px; TEXT-ALIGN: left">
<DIV id=sbChild1
style="FILTER: Alpha(Opacity=0, FinishOpacity=80, Style=1, StartX=0, StartY=0, FinishX=100, FinishY=0); WIDTH: 0%; POSITION: absolute; HEIGHT: 16px">
<DIV
style="FONT-SIZE: 1px;BACKGROUND:#a0ef99; WIDTH: 100%; HEIGHT: 100%"></DIV></DIV>
<DIV
style="FONT-SIZE: 12px; WIDTH: 100%; COLOR: red; FONT-FAMILY: arial; POSITION: absolute; TEXT-ALIGN: center"></DIV></DIV>
<!-- Status Bar Ends -->
<DIV id=infor
style=" WIDTH: 100%; COLOR: blue; FONT-FAMILY: arial; POSITION: relative; TEXT-ALIGN: center">

</DIV>
</div>

</BODY>

</html>
...全文
57 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
flylyke 2002-11-15
  • 打赏
  • 举报
回复
修改这一句:
window.setTimeout("fakeProgress(" + (v + 1) + ", document.all['" + el.id + "'])", 20);
改成
window.setTimeout("fakeProgress(" + (v + 1) + ", document.all['" + el.id + "'])", 1000);
后面修改的部分的时间控制你可以自己掌握。这里1000是代表1秒

87,993

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧