struts后台java怎么实现根据多张图片多线程

J2EE 码拜 9年前 (2015-04-02) 990次浏览 0个评论

<form id=”touxinagform” enctype=”multipart/form-data” method=”post” action=”shangche”>
<input type=”file” name=”fileupload”  multiple=”multiple” onchange=”uploadImage(this)” />
</form>
$(document)
.ready(
function() { 
var options = {    
url : “shangche”,
type : “POST”,
dataType : “json”, 
beforeSend : befo,
         uploadProgress: prog,  
success : processJson,
error: eJson  
};
$(“#touxinagform”).ajaxSubmit(options);
return false;
});
前台这样,struts后台java怎么实现根据多张图片多线程

struts后台java怎么实现根据多张图片多线程
5分
input type=”file”  也不能选择多个图片文件吧  
struts后台java怎么实现根据多张图片多线程
 multiple=”multiple” 就可以不知
struts后台java怎么实现根据多张图片多线程
是怎么做的,
struts后台java怎么实现根据多张图片多线程
5分
找个上传图片的插件。
struts后台java怎么实现根据多张图片多线程
上传插件不灵活想自己写个,就是没思路。
struts后台java怎么实现根据多张图片多线程
<input type=”file” name=”fileupload”  multiple=”multiple” onchange=”uploadImage(this)” />
 $(function(){
    var $tempHtml=””;
    for(var i=0;i<obj.files.length;i++){
    $tempHtml+=””<form id=”touxinagform””+i+””” enctype=”multipart/form-data” method=”post” action=”UploadFile.action”>””
    +””<input type=”file” name=”fileupload” onchange=”uploadImage(this)” />””
    +””</from>””;   
    }
    $(“#tuarea”).append($tempHtml);
把多上传分解成多个Form上传,然后new 多个Ajax,但问题是怎么请每个file控件分配到各自的file然后自动上传呢?
struts后台java怎么实现根据多张图片多线程
5分
直接用插件就好!
struts后台java怎么实现根据多张图片多线程
10分
服务端不用你考虑了,tomcat 等已经实现了多线程,你只要写单个线程中的功能实现就可以了

CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明struts后台java怎么实现根据多张图片多线程
喜欢 (0)
[1034331897@qq.com]
分享 (0)

文章评论已关闭!