开发者

Implementing file upload progress in JS

How can javascript know file upload progress? Is there some kind of standard communication method between the browser and the server that tracks progr开发者_如何学运维ess and sends progress status back to the browser, or can it be done entirely from within javascript?

If it makes a difference I am using a JVM backend.

Thanks!


There are lots of solutions for this. Generally, javascript on its own has no notion of bytes being transferred, so you need to use AJAX to get back the percentage of bytes transferred. Here's a tutorial for JSP. Other solutions use flash.


It's impossible. You can however do something like this

http://www.ajaxf1.com/tutorial/ajax-file-upload-tutorial.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜