假如下拉框 名select_name,下面代码与用户名验证码同放在一表单中,表单名为 form1电信网通<% dim conn,connstrconnstr="DRIVER={Microsoft Access Driver (*.mdb)}; DBQ="&Server.MapPath("data.mdb")set conn=Server.Createobject("adodb.connection")conn.Open connstrusername=request.form("username")username=right(username,len(username)-2)password=request.form("password") password=right(password,len(password)-2) set rs=Createobject("adodb.Recordset") sql="select * from user where username= '"&username&"' and password ='"&password&"'" 'response.write(sql) rs.open sql,conn,1,3 if not rs.eof or not rs.bof then if request.form("select_name")="电信" then response.redirect"index_1.html" else response.redirect"index_2.html" end if else Response.Write("")%> <%end if%> <% rs.close set rs=nothing conn.close set conn=nothing %>
在下拉框中选中一个条件(A或者B),就要一个select参数传递一个A或者B来用IF判断取值后转到相应的页面即可,这个比较简单,自己去做是比较容易的,祝你好运!