ASP选中下拉菜单中的内容点提交弹出内容所指定的网页页面????

来源:百度知道 编辑:UC知道 时间:2024/07/02 11:13:21
请详细点,最好是写出具体的代码?麻烦好心人了,
我的目的是选中下拉菜单里面的内容,点查看就能转到其指定的页面

主页是index1.asp
代码如下:
<!--#include file="conn.asp"-->
<html>
<head>
<%
sql="select * from ad"
rs.open sql,conn,1,3
%>
</head>

<body>
<form name="form1" method="post" action="这里要写吗?写什么?? ">
<div align="center">
<select name="class" id="class_id">
<%rs.movefirst
while(not rs.eof)
%>
<option value="<%=rs("title")%>" selected><%=rs("title")%></option>
<%
rs.movenext()
wend
%>
<select>
<input type="submit" name="Submit" value="查看">
</div>
</form>

<form name="form1" method="post" action="这里要写吗?写什么?? ">
改为
<form name="form1" method="post" action="index1.asp
?action=true">

<head>
<%
sql="select * from ad"
rs.open sql,conn,1,3
%>
</head>
加入一段程序
<head>
<%
if request.QueryString("action")="true" then
class1=request.form("class")
if calss1=rs("title") then
mylink=rs("link")
response.Redirect (mylink)
rs.close '//务必这此才关闭rs
response.end
end if
end if
sql="select * from ad"
rs.open sql,conn,1,3
%>
</head>