求一个 JAVASCRIPT web 进度条(原代码) 30
求一个JAVASCRIPTweb进度条(原代码)要求条如下:1,可以由界面调整进度条长度和颜色2,可以由界面调整进度条时间需要在WEB上制作,请发送到31417199@q...
求一个 JAVASCRIPT web 进度条(原代码)要求条如下:
1,可以由界面调整进度条长度和颜色
2,可以由界面调整进度条时间
需要在WEB上制作, 请发送到31417199@qq.com 万分感谢 展开
1,可以由界面调整进度条长度和颜色
2,可以由界面调整进度条时间
需要在WEB上制作, 请发送到31417199@qq.com 万分感谢 展开
2个回答
展开全部
<style>
html{
background-color:#cccccc;
}
</style>
<script>
document.write("<body></body>");
var i =0;
var processDiv2 = document.createElement("div");
processDiv2.style.height = "10px";
processDiv2.style.backgroundColor = "red";
var span = document.createElement("span");
span.style.color = "#000000";
span.innerHTML ="正在加载... 0 %";
span.style.marginLeft = (document.body.clientWidth-250)/2;
document.body.appendChild(processDiv2);
document.body.appendChild(span);
processDiv2.style.marginTop = (document.body.clientHeight-10)/2;
processDiv2.style.marginLeft = (document.body.clientWidth-500)/2;
function process(){
if(i<=500){
processDiv2.style.width = i+"px";
span.innerHTML ="正在加载... "+parseInt((i/500)*100)+" %";
i+=10;
setTimeout("process()",88);
}
}
setTimeout("process()",88);
</script>
html{
background-color:#cccccc;
}
</style>
<script>
document.write("<body></body>");
var i =0;
var processDiv2 = document.createElement("div");
processDiv2.style.height = "10px";
processDiv2.style.backgroundColor = "red";
var span = document.createElement("span");
span.style.color = "#000000";
span.innerHTML ="正在加载... 0 %";
span.style.marginLeft = (document.body.clientWidth-250)/2;
document.body.appendChild(processDiv2);
document.body.appendChild(span);
processDiv2.style.marginTop = (document.body.clientHeight-10)/2;
processDiv2.style.marginLeft = (document.body.clientWidth-500)/2;
function process(){
if(i<=500){
processDiv2.style.width = i+"px";
span.innerHTML ="正在加载... "+parseInt((i/500)*100)+" %";
i+=10;
setTimeout("process()",88);
}
}
setTimeout("process()",88);
</script>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询