commons-fileupload 上传时传递参数问题解决

来源:互联网 发布:代购网站 知乎 编辑:程序博客网 时间:2024/05/22 08:08

<script type="text/javascript">
   function send(){
    document.getElementById("formid").action = "<%=basePath %>login.jsp?images=" + document.getElementById("textvalue").value;
    document.getElementById("formid").submit();
   }
  </script>
  <body>
    <form action="" id="formid" method="post" enctype="multipart/form-data">&nbsp;
     <input type="text" id="textvalue"/>
     <input type="file" name="file"/>
     
     <input type="button" onclick="send()">
    </form>

 

在form中post不能再传非数据类型,只能用get。