<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">
<input type="text" id="textvalue"/>
<input type="file" name="file"/>
<input type="button" οnclick="send()">
</form>
在form中post不能再传非数据类型,只能用get。