asp 下拉菜单问题 10
<formname=form1method="post"action="<%ifeWebEditor="1"then%>NewsAdd1_eWebEditor_fywj....
<form name=form1 method="post" action="<%if eWebEditor="1" then%>NewsAdd1_eWebEditor_fywj.asp<%else if document.form1.E_BigClassID.value="3" then%>NewsAdd1_fywj.asp<%else%>NewsAdd1_fywj1.asp<%end if%><%end if%>">
<tr align="center">
<td colspan="1" class="TDtop" height=25>
<div align="center" >┊ <B>添加文章--类别选择</B> ┊</div>
</td>
</tr>
<input type=hidden name="E_typeid" value=<%=E_typeid%>>
<tr bgcolor="#FFFFFF">
<td align="center">
<p> </p>
<p>所属大类:
<select name="E_BigClassID" onChange="changelocation(document.form1.E_BigClassID.options[document.form1.E_BigClassID.selectedIndex].value)" size="1">
<option selected value="">请选择大类</option>
<%dim E_BigClassID,master,bigmaster,bigclassmaster
do while not rs2.eof
E_BigClassID=rs2("E_BigClassID")
master=rs2("bigclassmaster")
if master<>"" then
bigmaster=split(master,"|")
for i=0 to ubound(bigmaster)
if request.cookies(eChsys)("username")=trim(bigmaster(i)) then
bigclassmaster=true
exit for
else
bigclassmaster=false
end if
next
end if
if (request.cookies(eChsys)("key")="typemaster") or (request.cookies(eChsys)("key")="bigmaster" and bigclassmaster=true) or request.cookies(eChsys)("key")="super" or request.cookies(eChsys)("key")="check" or request.cookies(eChsys)("key")="selfreg" then
%>
<option value="<%=trim(rs2("E_BigClassID"))%>"><%=trim(rs2("E_BigClassName"))%></option>
<%
end if
rs2.movenext
loop
rs2.close
%>
</select>
所属小类:
<select name="E_SmallClassID" size="1">
<option selected value="">请选择小类</option>
</select>
</p>
<p> </p>
</td>
</tr>
<tr>
<td align="center" height=25 class="TDtop">
<input type="button" value=" 返 回 " name="B1" onclick=javascript:history.go(-1) >
<input type="submit" value=" 继 续 " name="B1" >
</td>
</tr>
</form>
如何判断选择的大类是哪个并跳转到相应的页面
比如我选择大类选项中的小说,点击提交就跳转到小说.ASP,选择新闻,就跳转到新闻.ASP 谢谢你,可是option中的选项都是从数据库读取的啊 展开
<tr align="center">
<td colspan="1" class="TDtop" height=25>
<div align="center" >┊ <B>添加文章--类别选择</B> ┊</div>
</td>
</tr>
<input type=hidden name="E_typeid" value=<%=E_typeid%>>
<tr bgcolor="#FFFFFF">
<td align="center">
<p> </p>
<p>所属大类:
<select name="E_BigClassID" onChange="changelocation(document.form1.E_BigClassID.options[document.form1.E_BigClassID.selectedIndex].value)" size="1">
<option selected value="">请选择大类</option>
<%dim E_BigClassID,master,bigmaster,bigclassmaster
do while not rs2.eof
E_BigClassID=rs2("E_BigClassID")
master=rs2("bigclassmaster")
if master<>"" then
bigmaster=split(master,"|")
for i=0 to ubound(bigmaster)
if request.cookies(eChsys)("username")=trim(bigmaster(i)) then
bigclassmaster=true
exit for
else
bigclassmaster=false
end if
next
end if
if (request.cookies(eChsys)("key")="typemaster") or (request.cookies(eChsys)("key")="bigmaster" and bigclassmaster=true) or request.cookies(eChsys)("key")="super" or request.cookies(eChsys)("key")="check" or request.cookies(eChsys)("key")="selfreg" then
%>
<option value="<%=trim(rs2("E_BigClassID"))%>"><%=trim(rs2("E_BigClassName"))%></option>
<%
end if
rs2.movenext
loop
rs2.close
%>
</select>
所属小类:
<select name="E_SmallClassID" size="1">
<option selected value="">请选择小类</option>
</select>
</p>
<p> </p>
</td>
</tr>
<tr>
<td align="center" height=25 class="TDtop">
<input type="button" value=" 返 回 " name="B1" onclick=javascript:history.go(-1) >
<input type="submit" value=" 继 续 " name="B1" >
</td>
</tr>
</form>
如何判断选择的大类是哪个并跳转到相应的页面
比如我选择大类选项中的小说,点击提交就跳转到小说.ASP,选择新闻,就跳转到新闻.ASP 谢谢你,可是option中的选项都是从数据库读取的啊 展开
展开全部
给你个参考例子:
<FORM name="guideform">
<SELECT name="guidelinks">
<OPTION SELECTED value="http://qdjacky.126.com">我的主页
<OPTION value="http://place.com/page2.htm">友情链接
<OPTION value="http://place.com/page3.htm">友情链接
<OPTION value="http://place.com/page4.htm">友情连接
</SELECT>
<INPUT type="button" name="go" value="Go!" onClick="window.location=document.guideform.guidelinks.options[document.guideform.guidelinks.selectedIndex].value"> </FORM>
<FORM name="guideform">
<SELECT name="guidelinks">
<OPTION SELECTED value="http://qdjacky.126.com">我的主页
<OPTION value="http://place.com/page2.htm">友情链接
<OPTION value="http://place.com/page3.htm">友情链接
<OPTION value="http://place.com/page4.htm">友情连接
</SELECT>
<INPUT type="button" name="go" value="Go!" onClick="window.location=document.guideform.guidelinks.options[document.guideform.guidelinks.selectedIndex].value"> </FORM>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询