日期:2014-05-18  浏览次数:20672 次

如何得到下拉框的内容
请问如何得到下拉框的内容
如 <option> 中国 </option>
怎么样得到“中国”在 <%ResultSet   rr=con.getRs( "select   team_no   from   team   where   team_name=“中国”);%>
谢谢

------解决方案--------------------
<select name= "**** ">
<option> 男 </option>
<option> 女 </option>
提交后 使用 request.getParameter( "**** ")
------解决方案--------------------
<form name= "form1 ">
//第一个下拉列表框
<select name= "select1 "onchange= "form1.submit(); ">
//第一个的动态数据我不写了
</select>
//第二个下拉列表框
<select name= "select2 "onchange= "form1.sumbit(); ">
<option> 内容 </option>
<%
ResultSet rr=con.getRs( "select team_no from team where team_name= ' "+a+ " ' ");
while(rr.next()){%>
<option value= <%=rr.getString( "id ")%> > <%=rr.getString( "name ")%> </option>
<%}
rr.close();%>
</select>

a是存放你第一个下拉列表框的值的变量,也就是“中国”