一、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-09-25
  • 2018-02-10
  • 2021-12-28
  • 2019-09-27
  • 2019-10-31
  • 2021-08-15
  • 2021-11-23
  • 2021-11-06
猜你喜欢
  • 2021-12-03
  • 2021-10-17
  • 2019-08-11
  • 2021-11-22
  • 2021-10-09
  • 2018-11-21
  • 2021-11-16
  • 2021-04-21
相关资源
相似解决方案