我给你例子,如果正确请给分。
<form name="form1" method="post" action="">
<td width="63">选择栏目:</td>
<td width="108"> <font color="#FF9900">
<select name="xltype" class="t8" onChange="MM_jumpMenu('parent',this,0)">
<%
if xltype="all" then
set rec=server.createobject("adodb.recordset")
str="select xltype,xlname from news_type where jstype=6"
rec.open str,conn,1,1
response.write "<option value='show_policy.asp?jstype=6&xltype=all' selected>全 部</option>"
While not rec.EOF
response.write "<option value='show_policy.asp?jstype=6&xltype="&rec("xltype")&"'>"&rec("xlname")&"</option>"
rec.movenext
wend
rec.close
set rec=nothing
else
set rec1=server.createobject("adodb.recordset")
str1="select xltype,xlname from news_type where jstype=6 and xltype="&xltype
rec1.open str1,conn,1,1
set rec2=server.createobject("adodb.recordset")
str2="select xltype,xlname from news_type where (jstype=6) and (xltype<>"&xltype&")"
rec2.open str2,conn,1,1
response.write "<option value='show_policy.asp?jstype=6&xltype=all'>全 部</option>"
response.write "<option value='show_policy.asp?jstype=6&xltype="&rec1("xltype")&"' selected>"&rec1("xlname")&"</option>"
While not rec2.EOF
response.write "<option value='show_policy.asp?jstype=6&xltype="&rec2("xltype")&"'>"&rec2("xlname")&"</option>"
rec2.movenext
wend
rec1.close
rec2.close
set rec1=nothing
set rec2=nothing
end if
%>
</select>
</font></td>
</form>