日期:2014-05-17  浏览次数:20808 次

action无法传递参数
1.asp
.....
<form name="form1" id="form1" method="post" action="2.asp" target="save" enctype="multipart/form-data">
<table border="0" cellspacing="0" cellpadding="0" align="center" width="750" height="200"> 
<tr height="50">
  <td align="left" style="font-size:12px;color:#00346D;" align="center">
  图片描述一:<input id="id1" name="id1" type="text" />
 </td>
</tr>
<tr height="50">
  <td align="left" style="font-size:12px;color:#00346D;" align="center">
  图片描述二:<input id="id2" name="id2" type="text" />
 </td>
</tr>

<tr height="50">
  <td align="left" style="font-size:12px;color:#00346D;" align="center">
  图片:<input class="class1" type="file" name="mefile" size="50">图片格式为"*.jpg,文件大小小于200k"
  </td>
</tr>

</table>
<input type=submit name=ok value="OK">
</form>
</BODY>
</HTML>
<script language="vbscript">  
  function bc_onclick()
  form1.action=form1.action + "?id1=" & document.all("id1").value&id2=" & document.all("id2").value
  end function
</script>

在2.asp中 无法获取id1,id2 的数值
2.asp如下:
id1=Request.QueryString("id1")
id2=Request.QueryString("id2")

response.Write id1
response.Write id2

response.End

------解决方案--------------------
因为是用form传值的,所以在接收的时候要用request.form或者request进行接收才能接收到

id1=Request.form("id1")
id2=Request.form("id2")

试试