javascript进度条 显示 JavaScript函数执行的进度 简单的, 控制CSS来做。 呵! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 异步的还可以这样做,网上有很多loading的图片,直接用一个以行了,控制显示与隐藏display: block|nonevisibility: visible|hidden <html><head><script type="text/javascript">function $(selector){ return document.getElementById(selector);}(function(){ var index = 0; var timer = null; $.show = function (){ var d1 = $("d1"), d2 = $("d2"); timer = setInterval(loading,100); function loading(){ if(index>=100){ clearInterval(timer); return;} d1.style.width = ++index + "%"; d2.innerHTML = "已加载" + index + "/100"; } } $.end = function (){ if(timer){ clearInterval(timer); } }})();</script></head><body> <div style="border:1px blue solid;width:800px;height:25px"> <div style="width:0px;height:23px;background-color:#FF99CC" id="d1"></div> </div> <div id="d2" style="font-size:9pt"> </div> <input type="button" value="开始" onclick="$.show();"> <input type="button" value="结束" onclick="$.end();"></body></html> 验证提示的问题[急] extjs动态树刷新问题! 如何用JS实现动态的修改title 怎样实现一个滚动条(slider) 求助一个简单的二级菜单javascript代码 页面间传值的问题 ...问个javascript的简单问题。。。 javascript 中如何vs.net的后台函数或vs.net的button_click事件 如何从JSP中返回的(2003/2/10)中,在JAVASCRIPT中单独去出年,月,日! javascript怎么操作sql数据库??谢谢!! 来帮忙看一下,为什么出错 求高手解答,老师都无法解释的问题
visibility: visible|hidden
<html>
<head>
<script type="text/javascript">
function $(selector){
return document.getElementById(selector);
}
(function(){
var index = 0;
var timer = null; $.show = function (){
var d1 = $("d1"), d2 = $("d2");
timer = setInterval(loading,100);
function loading(){
if(index>=100){ clearInterval(timer); return;}
d1.style.width = ++index + "%";
d2.innerHTML = "已加载" + index + "/100";
}
}
$.end = function (){
if(timer){
clearInterval(timer);
}
}
})();
</script>
</head>
<body>
<div style="border:1px blue solid;width:800px;height:25px">
<div style="width:0px;height:23px;background-color:#FF99CC" id="d1"></div>
</div>
<div id="d2" style="font-size:9pt"> </div> <input type="button" value="开始" onclick="$.show();">
<input type="button" value="结束" onclick="$.end();">
</body>
</html>