`
caozuiba
  • 浏览: 902935 次
文章分类
社区版块
存档分类
最新评论

用下拉列表跳转页面

 
阅读更多
<select name="select" onChange="var jmpURL=this.options[this.selectedIndex].value;if(jmpURL!='') {window.location=jmpURL;} else {this.selectedIndex=0;}">
<option>选择商品分类</option>
<%
set rs=server.createobject("adodb.recordset")
rs.Open "select * from shop_class order by order",conn,1,1
do while not rs.eof
%>
<option value="class.asp?id=<%=rs("classid")%>&class=<%=rs("class")%>" <%if rs("classid")=cint(request.QueryString("id")) then %>selected<%end if%>><%=trim(rs("class"))%></option>
<%
rs.movenext
loop
rs.close
set rs=nothing
%>
</select>
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics