第1个回答 2019-10-10
<option
checked>choose
vendor
name</option>
<%
//这里有个类连接数据库,查询需要的字段,并将其封装,返回个ArrayList
FreshBean
fb=new
FreshBean();
ArrayList
list=fb.getVendorMainInfo();
Iterator
it=list.iterator();
while(it.hasNext()){
VendorMainInfo
vmi=(VendorMainInfo)it.next();
%>
<option
value="<%=vmi.getVendor_name()%>">
<%=vmi.getVendor_name()%>
</option>
<%
}
%>
</select>
第3个回答 推荐于2016-07-25
<option checked>choose vendor name</option>
<%
//这里有个类连接数据库,查询需要的字段,并将其封装,返回个ArrayList
FreshBean fb=new FreshBean();
ArrayList list=fb.getVendorMainInfo();
Iterator it=list.iterator();
while(it.hasNext()){
VendorMainInfo vmi=(VendorMainInfo)it.next();
%>
<option value="<%=vmi.getVendor_name()%>">
<%=vmi.getVendor_name()%>
</option>
<%
}
%>
</select>本回答被提问者采纳