如何让下拉菜单 选择默认为空???
如下图:作业负责人添加时默认为登录的人员,不能为空,如何修改代码改为默认为空的??<%
if request.Cookies("shiwei_id")=1 then
sql="select * from login order by id_zu,id"
set rs_login=conn.execute(sql)
else
sql="select * from login where id="&request.Cookies("shiwei_id")
set rs_login=conn.execute(sql)
end if
if rs_login.eof then
%>
<script language="javascript">
alert("请先添加员工!")
window.location.href="../system/user_add.asp"
</script>
<%
response.end
else
%>
<select name="id_login">
<%
do while rs_login.eof=false
%>
<option value="<%=rs_login("id")%>"<%if trim(cstr(rs_login("id")))=trim(cstr(request.Cookies("shiwei_id"))) then%> selected="selected"<%end if%>><%=rs_login("username")%> </option>
<%
rs_login.movenext
loop
%>
</select>
<%
end if
%>
这是这段代码