js代码
<script language="javascript"> function processerbar(time){ document.getElementById('probar').style.display="block"; $("#line").each(function(i,item){ var a=parseInt($(item).attr("w")); $(item).animate({ width: a+"%" },time); }); var si = window.setInterval( function(){ a=$("#line").width(); b=(a/200*100).toFixed(0); document.getElementById('percent').innerHTML=b+"%"; document.getElementById('percent').style.left=a-12+"px"; document.getElementById('msg').innerHTML="上传中"; if(document.getElementById('percent').innerHTML=="100%") { clearInterval(si); document.getElementById('msg').innerHTML=" 成功"; } },70); }; </script>