asp 怎么下拉框绑定数据库?
展开全部
<!--#include file="Conn.asp"-->
<%
set rs=server.createobject("adodb.recordset")
sql="select * from apgs" ---数据库
rs.open sql,conn,1,1
%>
<label>
<select name="hawb" id="hawb">
<option>All_HAWB</option>
<%
if rs.recordcount > 0 then
do while not rs.eof
%>
<option> <%=rs("字段名")%></option>
<%
rs.movenext
loop
end if
%>
</select>
</label>
<%
rs.close
set rs=nothing
%>
<%
set rs=server.createobject("adodb.recordset")
sql="select * from apgs "
rs.open sql,conn,1,1
%>
<label>
<select name="ocrd" id="ocrd">
<option>OCRD</option>
<%
if rs.recordcount > 0 then
do while not rs.eof
%>
<option> <%=rs("OCRD")%></option>
<%
rs.movenext
loop
end if
%>
</select>
</label>
<%
rs.close
set rs=nothing
%>
看下不懂再问我吧··
<%
set rs=server.createobject("adodb.recordset")
sql="select * from apgs" ---数据库
rs.open sql,conn,1,1
%>
<label>
<select name="hawb" id="hawb">
<option>All_HAWB</option>
<%
if rs.recordcount > 0 then
do while not rs.eof
%>
<option> <%=rs("字段名")%></option>
<%
rs.movenext
loop
end if
%>
</select>
</label>
<%
rs.close
set rs=nothing
%>
<%
set rs=server.createobject("adodb.recordset")
sql="select * from apgs "
rs.open sql,conn,1,1
%>
<label>
<select name="ocrd" id="ocrd">
<option>OCRD</option>
<%
if rs.recordcount > 0 then
do while not rs.eof
%>
<option> <%=rs("OCRD")%></option>
<%
rs.movenext
loop
end if
%>
</select>
</label>
<%
rs.close
set rs=nothing
%>
看下不懂再问我吧··
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2015-06-26
展开全部
<,--#include file="Conn.asp"-->
<%
set rs=server.createobject("adodb.recordset")
sql="select * from apgs" ---数据库
rs.open sql,conn,1,1
%>
<label>
<select name="hawb" id="hawb">
<option>All_HAWB</option>
<%
if rs.recordcount > 0 then
do while not rs.eof
%>
<option> <%=rs("字段名")%></option>
<%
rs.movenext
loop
end if
%>
</select>
</label>
<%
rs.close
set rs=nothing
%>
<%
set rs=server.createobject("adodb.recordset")
sql="select * from apgs "
rs.open sql,conn,1,1
%>
<label>
<select name="ocrd" id="ocrd">
<option>OCRD</option>
<%
if rs.recordcount > 0 then
do while not rs.eof
%>
<option> <%=rs("OCRD")%></option>
<%
rs.movenext
loop
end if
%>
</select>
</label>
<%
rs.close
set rs=nothing
%>
看下不懂再问我吧··。
<%
set rs=server.createobject("adodb.recordset")
sql="select * from apgs" ---数据库
rs.open sql,conn,1,1
%>
<label>
<select name="hawb" id="hawb">
<option>All_HAWB</option>
<%
if rs.recordcount > 0 then
do while not rs.eof
%>
<option> <%=rs("字段名")%></option>
<%
rs.movenext
loop
end if
%>
</select>
</label>
<%
rs.close
set rs=nothing
%>
<%
set rs=server.createobject("adodb.recordset")
sql="select * from apgs "
rs.open sql,conn,1,1
%>
<label>
<select name="ocrd" id="ocrd">
<option>OCRD</option>
<%
if rs.recordcount > 0 then
do while not rs.eof
%>
<option> <%=rs("OCRD")%></option>
<%
rs.movenext
loop
end if
%>
</select>
</label>
<%
rs.close
set rs=nothing
%>
看下不懂再问我吧··。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询