asp表单提交的问题

huayugu 2009-09-20 04:54:21
first.asp代码如下:
<html>

<head>

<title>Redirect示例</title>

</head>

<body>

<form aciton="formjump.asp" method="post">

<select name="wheretogo">

<option selected value="fun">Fun</option>

<option value="news">News</option>

<option value="sample">Sample</option>

</select>

<input type=submit name="jump" value="Jump">

</form>

</body>

</html>
formjump.asp如下:
<%response.buff=true%>

<html>

<head>

<title>Rt示例</title>
</head>
<body>

<%
thisurl="http://192.168.245.2/te3"
where=Request.form("wheretogo")
Select Case where
case "fun"
response.redirect thisurl & "/fun/fun.asp"
case "news"
response.redirect thisurl & "/news/news.asp"
case "sample"
response.redirect thisurl & "/sample/sample.asp"
End Select
response.flush
%>

</body>

<html>
fun.asp代码如下:
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 1</title>
</head>

<body>
<% response.write("兴趣网站测试") %>
</body>

</html>


当执行first.asp中的选择按钮,提交后不会出现相应的fun\news\sample网页,请朋友们给指点一下
...全文
66 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
hookee 2009-09-20
  • 打赏
  • 举报
回复
first.asp

<html>
<head>
<title>Redirect示例 </title>
</head>
<body>
<form action="formjump.asp" method="post">
<select name="wheretogo">
<option selected value="fun">Fun </option>
<option value="news">News </option>
<option value="sample">Sample </option>
</select>
<input type=submit name="jump" value="Jump">
</form>
</body>
</html>


formjump.asp

<%
Response.buffer=true
%>
<html>
<head>
<title>Rt示例 </title>
</head>
<body>
<%
thisurl="http://192.168.245.2/te3"
where=Request.form("wheretogo")
Select Case where
case "fun"
response.redirect thisurl & "/fun/fun.asp"
case "news"
response.redirect thisurl & "/news/news.asp"
case "sample"
response.redirect thisurl & "/sample/sample.asp"
End Select
response.flush
%>
</body>
<html>


zzhqiao 2009-09-20
  • 打赏
  • 举报
回复
first.asp页面的form中的action 打错了。
这个页面formjump.asp中的response.buff改成response.buffer.

28,391

社区成员

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

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