有没有批量图片上传的控件呀,QQ群相册上传图片的那种。

解决方案 »

  1.   

    http://www.51aspx.com/CV/163FileUpload/51aspx上仿163多文件上传的源码。楼主请参考
      

  2.   

    http://topic.csdn.net/u/20091010/23/8290e931-18ca-4ca2-a086-efac0e820610.html
      

  3.   

    function addFile()

    var a = 1;      
        if(No_sys<10)
        {
        
         var n = No_sys;
         var str = '<span id="s'+n+'"><br/><INPUT type="file"  class="input-fatie" size="50" name="file'+n+'" class="func"><input type="button" name="btnDel" value="删除" class="func" onclick="delFile(s'+n+');"></span>'
         document.getElementById('MyFile').insertAdjacentHTML("beforeEnd",str);
         No_sys++;
          a = No_sys;
    }
    else
    {
         alert("一次最多只能上传十个文件");
         return false;
    }
         document.form1.num.value=a+No_sys;
        
    }try
    {
        //上传文件
        //上传文件个数
        int number =Integer.parseInt(su.getRequest().getParameter("num"));            for(int i=0;i!=number;i++){
            try{
             com.jspsmart.upload.File file = su.getFiles().getFile(i);  
         if (!file.isMissing())
         { file.saveAs(...);        }
             else
                      { continue;//若文件不存在则继续     }      
    }
    catch(Exception)
    {
    }