下拉框反回选定的文字 (修改页面经常用到)

类别:Asp 点击:0 评论:0 推荐:
<!-- #include file="connect.asp" -->
            <select name="info" size="1">
           <% word=request("word")
            sql="select * from 试卷信息"
            rs.open sql,conn,1,1
              do while not rs.eof
           %>
          <option <%if rs("试卷名称")=word then response.write "selected"%> value="<%=rs("试卷名称")%>"><%=rs("试卷名称")%></option>
           <%
             rs.movenext
             loop
             rs.close
             set rs=nothing
           %></select>
 <form name=form1 method=get action="2.asp">
 <input type=text value="" name=word>
 <input type=submit name=submit1 value=submit></form>

本文地址:http://com.8s8s.com/it/it7841.htm