用smartupload,去看看它的例子

解决方案 »

  1.   

    在jsp中用javascript实现,我前几天刚做过的,好使!
    把action写javascript中,用参数传。function getFileDir()
        {
          if(upload.filename.value==""){
                window.alert("请输入要上传的文件名!");
                upload.filename.focus();
                return false;
                }
          filedir=upload.filename.value;
          upload.action="/uploadfile/servlet?filedir="+filedir+"";
          return true;
        }