用下拉列表跳转页面

    技术2022-05-11  99

    <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>

    最新回复(0)