jQuery Load Progress Bar

2019-04-08 05:51发布

问题:

So, I'm sure this question HAS to have been asked, but after searching through the 'Related Questions' here as well as several Google searches...I have come up empty.

I'm simply trying to implement a true bytes_loaded/bytes_total type of progress bar in jQuery or even traditional Js. This was so easy in the AS3 days :) ...but of course Flash comes with it's drawbacks. All I really need to know is how to calculate the current bytes loaded and bytes total during any download. Calculating the uploaded bytes would be sweet too. Anyone have another posted question to direct me to? Or have knowledge of the subject? Thanks guys.

回答1:

There is a Q/A on progress bars for long process reporting on the server. Also check out how to get AJAX download progress in every browser but IE.



回答2:

There are frameworks/plugins for this available:
http://blog.stevensanderson.com/2008/11/24/jquery-ajax-uploader-plugin-with-progress-bar/
http://webdeveloperplus.com/jquery/multiple-file-upload-with-progress-bar-using-jquery/
and so on...