开发者

stop/cancel file upload in html?

If i have a file upload and i click on something to cancel it, how do i stop the upload? I tried doing $('form').remove() and it appears to continue uploading. Maybe i should put it开发者_Go百科 in an iframe and destroy the iframe? then i need to figure out how to reload it hmm.

Are there any known cross platform ways?

-edit- btw this must be done in pure html and js, no flash or silverlight.


Use Flash to upload the file, then you have a lot more control to include a progress bar and allow the client to cancel.

Here's a commonly used JS wrapper, but I don't know if this specific one has a cancel api:

http://code.google.com/p/swfupload/

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜