<select name="
ID" >
<option selected value="">选择类别</option>
<%
sql="select * from [
表]"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
do while not rs.eof%><option value="<%=rs("
ID")%>"><%=rs("
字段名称")%></option>
<%rs.movenext
loop
if rs.eof and rs.bof then
%>
<option value="0">当前没有分类</option>
<%end if%>
</select>