怎么获取form提交的表单

soso5 2005-11-03 03:41:17
<!--#include file="conn.asp" -->
<%
y=request.form("route")
response.redirect "bus_x.html?id=y"
%>
...全文
190 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
soso5 2005-11-03
  • 打赏
  • 举报
回复
<form style="margin:0px" action="goto.asp" method="get" name="form">
<td width="137"><div align="center">
<input name="route" type="text" class="input1" id="route" size="12" value="请输入线路" onclick="Javascript:this.value='';">
</div></td>
<td><div align="center">
<input name="image" type="image" style="curosr:hand" src="../images/bus/search.jpg" align="absmiddle" width="68" height="34">
</div></td></form>
goto.asp下面

<!--#include file="conn.asp" -->
<%
y=request.form("route")
response.redirect "bus_x.html?id=y"
%>
实现跳到bus_x.html?id=y
dh20156 2005-11-03
  • 打赏
  • 举报
回复
好象在猜谜,谜题又是另外一个谜。 ^_^
soso5 2005-11-03
  • 打赏
  • 举报
回复
我就是接入form提交来的值
竹林听雨2005 2005-11-03
  • 打赏
  • 举报
回复
其实用GET就是最简单的方法:
<form ..... method="get">
danis_cn 2005-11-03
  • 打赏
  • 举报
回复
y=request.form("route")
response.redirect "bus_x.html?id="&y

dh20156 2005-11-03
  • 打赏
  • 举报
回复
参考:
htmstr.htm

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<META NAME="Author" CONTENT="haiwa">
<title>html传递参数</title>
</head>

<body>
<SCRIPT LANGUAGE="JavaScript">
<!--
function Request(strName)
{
var strHref = window.document.location.href;
var intPos = strHref.indexOf("?");
var strRight = strHref.substr(intPos + 1);

var arrTmp = strRight.split("&");
for(var i = 0; i < arrTmp.length; i++)
{
var arrTemp = arrTmp[i].split("=");

if(arrTemp[0].toUpperCase() == strName.toUpperCase()) return arrTemp[1];
}
return "";
}
alert(Request("id"))
//-->
</SCRIPT>
<a href="htmstr.htm?id=a">test</a>
</body>

</html>
wangjian727924 2005-11-03
  • 打赏
  • 举报
回复
response.redirect("bus_x.asp?id="&y)
到了要给分哦!!!!
zly22169846 2005-11-03
  • 打赏
  • 举报
回复
什么意思?
你这样y=request.form("route")
已经获得了form传过来的参数了。
然后你是想把这个参数再传到bus_x.html吗?
你得把后缀名改成 .asp。要不传不了。
在bux_x.asp页面你可以用
f_y=request("y")
或者f_y=request.querystring("y")来接收

28,406

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧