日期:2014-05-17 浏览次数:20759 次
<select name="select_t" size="1"> <option value="0" >请选择查询时间</option> <% dim char(21) i=0 see=0 sql="select * from jhgz " set time_rs=server.CreateObject("adodb.recordset") time_rs.open sql,conn,1,1 do while Not time_rs.EOF for j=0 to i if char(j) = month(time_rs("time")) then see=1 exit for else see = 0 end if next if see=0 then char(i)=month(time_rs("time")) %> <option value="<%=time_rs("time")%>"><%=time_rs("time")%></option> <% 'char(i)=time_rs("time") i=i+1 end if time_rs.movenext loop time_rs.close set time_rs = nothing %> </select>