<% set cmd = conn.execute("select bigclassid,bigclassname from bigclass") tempid=cmd("bigclassid") %> <select name="menu" onChange="getsubcategory(this.value);"> <% if not cmd.eof then do while not cmd.eof bigclassid= cmd("bigclassid") bigclassname = cmd("bigclassname") %> <option value="<%=bigclassid%>"><%=bigclassname%> <% cmd.movenext loop end if cmd.close set cmd = nothing %>
<div id="subclass"> <select name="submenu"> <% set cxd = conn.execute("select from smallclass where bigclassid=" & tempid) if not cxd.eof then do while not cxd.eof smallclassid= cxd("smallclassid") smallclassname = cxd("smallclassname")%> <option value="<%=smallclassid%>"><%=smallclassname%> <% cxd.movenext loop cxd.close set cxd = nothing else html = "" response.write html end if %>
<% response.charset="gb2312" bigclassid=safe(request.querystring("bigclassid")) if bigclassid<>"" then set re=new regexp re.ignorecase=true re.global=false re.pattern = "^[0-9]{1,3}$" if not re.test(bigclassid) then response.write "非法参数" response.end end if%> <%on error resume next set p = conn.execute("select from smallclass where bigclassid=" & bigclassid) if err then err.clear response.write "查询出错" response.end end if if not p.eof then html = "" else html = "" end if p.close set p = nothing conn.close set conn = nothing response.write html html = "" end if %>