如何保存从innerHTML javascript上传的文件? [英] how to save file upload from the innerHTML javascript?

查看:39
本文介绍了如何保存从innerHTML javascript上传的文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个默认的aspx,它带有一个母版页,我有这个用于文件上传的javascript,所以如何将其保存到文件夹中调用文件

i have a default aspx which has a master page with it i have this javascript for upload of file, so how can i save this into a folder call files

<script type = "text/javascript">
     var counter = 0;

           function AddFileUpload() {
               var div = document.createElement('DIV');
               div.innerHTML = '<input id="file' + counter + '" name = "file' + counter + '" type="file" /><input id="Button' + counter + '" type="button" value="Remove" onclick = "RemoveFileUpload(this)" />';
               document.getElementById("FileUploadContainer").appendChild(div);
               counter++;
           }
</script>


   <asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent" >

           <span style ="font-family:Arial">Click to add files</span>  

           <br /><br />

           <div id = "FileUploadContainer"  runat="server" >

           </div>
           <br />
           <input id="ButtonAdd" type="button" value="add" onclick = "AddFileUpload()" />
           <asp:Button ID="btnUpload" runat="server" Text="Upload"  />
       <asp:Label ID="lbl2" runat="server" ForeColor="Red"></asp:Label>
           <br />

   </asp:Content>

推荐答案



我认为您正在尝试使某个人成为现实,因此我建议您使用生产"中已经存在的一些解决方案:
1. http://www.fyneworks.com/jquery/multiple-file-upload/ [ ^ ]
2. http://www.uploadify.com/ [ ^ ]
3. http://blueimp.github.com/jQuery-File-Upload/ [ ^ ]
4. http://webdeveloperplus.com/jquery/multiple-file-upload -with-progress-bar-using-jquery/ [ ^ ]
5. 使用jQuery在ASP.NET中上传多个文件 [ ^ ]
Hi,

I think that what you are trying to make someone already made, so I suggest you to use some solution that is already in "production":
1. http://www.fyneworks.com/jquery/multiple-file-upload/[^]
2. http://www.uploadify.com/[^]
3. http://blueimp.github.com/jQuery-File-Upload/[^]
4. http://webdeveloperplus.com/jquery/multiple-file-upload-with-progress-bar-using-jquery/[^]
5. Upload Multiple Files in ASP.NET using jQuery[^]


这篇关于如何保存从innerHTML javascript上传的文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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