www.gusucode.com > cso中国seo优化html整站源码程序 > manage/ajax/smallid.asp
<!--#include file="../../include/conn.asp"--> <!--#include file="../../include/fun.asp"--> <% response.ContentType = "text/html;charset=gb2312" set rs = server.createobject("adodb.recordset") t = request("t") classid = request("classid") smallid = request("smallid") if classid = "" then sql = "select * from so_class where typestr = '"&t&"' order by orderid desc,id desc" rs.open sql,conn,1,1 classid = rs("id") rs.close end if %> <select name="smallid"> <option value="0">暂不分小类!</option> <% sql = "select * from so_class where classid = "&classid&" order by orderid desc,id desc" rs.open sql,conn,1,1 do while not rs.eof if smallid = "" then selstr = "" else if cint(smallid) = rs("id") then selstr = " selected" else selstr = "" end if end if %> <option value="<%=rs("id")%>"<%=selstr%>><%=rs("title")%></option> <% rs.movenext if rs.eof then exit do loop rs.close set rs = nothing %> </select>