通过select中属性selected 来定义初值。
如下:
<select size="1" name="item" onChange="location=this.options[this.selectedIndex].value">
<option value="?s_ServiceId=0" <%If s_ServiceId=0 Then%>selected <%End if%>>全部</option>
<%
Set rs_lei = server.createobject("adodb.recordset")
sql = "select * from tb"
rs_lei.open sql,conn,1,1
do while not rs_lei.eof
if rs_lei("s_ServiceId") <> 0 Then
%>
<option value="?s_ServiceId=<%=rs_lei("s_ServiceId")%>" <%If s_ServiceId=rs_lei("s_ServiceId") Then%>selected <%End if%>><%=rs_lei("s_Service")%></option>
<%end if
rs_lei.movenext
loop
rs_lei.close
set rs_lei = Nothing
%>
</select>