无需刷新页面的形式上传文件 [英] Uploading file in a form without page refresh

查看:116
本文介绍了无需刷新页面的形式上传文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有code此位:

<form name="myUploadForm" method="post" action="/scripts/upload.do" enctype="multipart/form-data" id="fileUpload">
   <table width="100%" border="0"> 
      <tr>
         <td>
            <input type="file" name="xlsFile" size="60" value="test.xls"> 
            <input type="button" value="Upload File" name="upload_xls">
         </td>
      </tr>
   </table>
</form>

现在,我可以上传和Struts的文件,但它刷新页面。如何做到这一点没有页面清爽?

Right now I can upload the file with Struts but it refreshes the page. How do I do this without the page refreshing?

推荐答案

如果你使用jQuery,您可以使用类似的 jQuery的文件上传

If you can use jQuery, you can use something like jQuery File Upload.

这篇关于无需刷新页面的形式上传文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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