asp中如何获取form的值
<form id="form3" name="form3" action="ins_query.asp" method="POST" enctype="multipart/form-data">
<input type="hidden" id="pro" name="pro" />
</form>
submit之后
ins_query.asp如何拿到pro
语言是vb 展开
asp获取form表单中的值:
使用get传值:Request.QueryString("formname")和使用post传值:Request.Form("formname")或者直接使用Request("formname")
1、get传值方法:Request.QueryString("formname")获取表单值
举例:<% response.write request.querystring("txt") %>
<from action="">
<input type="text" name="txt" value="" />
<input type="submit" name="sb" value=" submit " />
</form>
2、post传值方法:Request("formname")获取表单值
举例:<%
ac = request("ac")
if ac = "post" then
response.write request("txt")
'response.write("<script>alert('ok');location.href='test.asp';</script>")
end if
%>
<form action="test.asp?ac=post" method="post">
<input type="text" name="txt" value="11111" />
<input type="submit" name="sb" value=" submit " />
</form>
在ins_query.asp
response.write request.form("pro")
<%
response.write request("pro")
%>