<select name=mm>
<option<%if request("mm")=1 then response.write" selected"%> value=1>1
<option<%if request("mm")=2 then response.write" selected"%> value=2>2
<option<%if request("mm")=3 then response.write" selected"%> value=3>3
</select>

解决方案 »

  1.   

    <select id=sel name=sel>
    <option checked><%=request("sel")%></option>
    .....
    </select>
      

  2.   

    <select id=sel name=sel>
    <option selected><%=request("sel")%></option>
    .....
    </select>
      

  3.   

    http://expert.csdn.net/Expert/FAQ/FAQ_Index.asp?id=36948
      

  4.   

    <select id=sel name=sel>
    <option value=1 checked>1</option>
    <option value=2 >2</option>
    </select>
    <script>
       document.all.sel.value="<%=request("sel")%>";
    </script>
      

  5.   

    我的Select是数据库中得到数据形成的,有没有可以通过js函数设置select某一项选中?
      

  6.   

    <select name=mm>
    <option <% if instr(cstr(request("id")),cstr(Rs("id")))<>0 then response.write "selected"%> value=<%=Rs("id")%>><%=Rs("idname")%></option>
    </select>