jQuery上传完成后重定向到新页面 [英] Redirect to new page after jquery uploads done

查看:107
本文介绍了jQuery上传完成后重定向到新页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用此jquery工具与我的网站一起上传文件: https://github.com/blueimp/jQuery-File-Upload ,而我大部分时间都在使用它.我唯一遇到的问题是试图找到一个可以重定向到新页面的位置,以显示上载的结果,而不是将它们显示在同一页面上.我想让用户可以选择使用他们刚刚上传的图像和文件来做事,而新页面比一遍又一遍地使用同一页面更有意义.

I am trying to get this jquery tool to work with my website for file uploads: https://github.com/blueimp/jQuery-File-Upload and I have it working for the most part. The only issue I am having is trying to find a place where I can make it redirect to a new page to display the results of the upload instead of displaying them on the same page. I want to have the option for the users to do things with the images and files they just uploaded, and a new page makes more sense for this than using the same page over and over and over again...

任何人都可以从理解文档/代码中我不知道如何做到这一点的经验中告诉我吗?谢谢:)请注意,如果要再上传四个文件,我希望页面在所有上传的末尾而不是在第一个之后被重定向.我将把数据存储在PHP会话中以在下一页访问.

Can anyone tell me from experience of understanding something in the documentation/code that I didn't grasp on how I can do this? Thanks :) Please note that i want the page to be redirected at the end of ALL of the uploads and not after the first if there are four more. I will be storing the data in a PHP session to access on the next page.

推荐答案

应该是这样的(在这种情况下,重定向到 http://stackoverflow. com ):

Should be like this (in this case redirecting to http://stackoverflow.com):

<script>
$(function () {
    $('#fileupload').bind('fileuploadstop', function (e) {/* ... */});

});
</script>

查看文档.

这篇关于jQuery上传完成后重定向到新页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆