一、setInterval   

onProgress: function(file, loaded, total) {
            var eleProgress= _this.find('#fileupload_'+instanceNumber+'_'+file.index+' .uploadify-progress');
            var progressBar = eleProgress.children('.uploadify-progress-bar');
            var timer=null;
            timer=setInterval(function(){
                var iWidth=progressBar[0].offsetWidth/eleProgress[0].offsetWidth*100;
                progressBar[0].style.width=progressBar[0].offsetWidth+0.5+'px';
                progressBar[0].innerHTML=Math.round(iWidth)+"%";
                if(iWidth==99){
                    clearInterval(timer);
                }
            },10);
          },

 

 

 

 

 

-----

  srouce:【1】http://www.zzjs.net/html/414.html

     【2】jquery setInterval()

相关文章:

  • 2021-10-07
  • 2022-01-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-04
  • 2021-12-23
  • 2022-02-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-22
相关资源
相似解决方案